Package org.apache.flink.runtime.state
Class ChangelogTaskLocalStateStore
- java.lang.Object
-
- org.apache.flink.runtime.state.TaskLocalStateStoreImpl
-
- org.apache.flink.runtime.state.ChangelogTaskLocalStateStore
-
- All Implemented Interfaces:
OwnedTaskLocalStateStore,TaskLocalStateStore
public class ChangelogTaskLocalStateStore extends TaskLocalStateStoreImpl
Changelog's implementation of aTaskLocalStateStore.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.state.TaskLocalStateStoreImpl
allocationID, discardExecutor, disposed, jobID, jobVertexID, localRecoveryConfig, lock, storedTaskStateByCheckpointID, subtaskIndex, TASK_STATE_SNAPSHOT_FILENAME
-
-
Constructor Summary
Constructors Constructor Description ChangelogTaskLocalStateStore(org.apache.flink.api.common.JobID jobID, AllocationID allocationID, JobVertexID jobVertexID, int subtaskIndex, LocalRecoveryConfig localRecoveryConfig, Executor discardExecutor)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>dispose()Disposes the state of all local snapshots managed by this object.protected FilegetCheckpointDirectory(long checkpointId)static org.apache.flink.core.fs.PathgetLocalTaskOwnedDirectory(LocalSnapshotDirectoryProvider provider, org.apache.flink.api.common.JobID jobID)voidpruneCheckpoints(LongPredicate pruningChecker, boolean breakOnceCheckerFalse)Pruning the useless checkpoints, it should be called only when holding theTaskLocalStateStoreImpl.lock.voidstoreLocalState(long checkpointId, TaskStateSnapshot localState)Stores the local state for the given checkpoint id.StringtoString()-
Methods inherited from class org.apache.flink.runtime.state.TaskLocalStateStoreImpl
abortCheckpoint, confirmCheckpoint, deleteDirectory, getLocalRecoveryConfig, getLocalRecoveryDirectoryProvider, pruneMatchingCheckpoints, retrieveLocalState
-
-
-
-
Constructor Detail
-
ChangelogTaskLocalStateStore
public ChangelogTaskLocalStateStore(@Nonnull org.apache.flink.api.common.JobID jobID, @Nonnull AllocationID allocationID, @Nonnull JobVertexID jobVertexID, @Nonnegative int subtaskIndex, @Nonnull LocalRecoveryConfig localRecoveryConfig, @Nonnull Executor discardExecutor)
-
-
Method Detail
-
getLocalTaskOwnedDirectory
public static org.apache.flink.core.fs.Path getLocalTaskOwnedDirectory(LocalSnapshotDirectoryProvider provider, org.apache.flink.api.common.JobID jobID)
-
storeLocalState
public void storeLocalState(long checkpointId, @Nullable TaskStateSnapshot localState)Description copied from interface:TaskLocalStateStoreStores the local state for the given checkpoint id.- Specified by:
storeLocalStatein interfaceTaskLocalStateStore- Overrides:
storeLocalStatein classTaskLocalStateStoreImpl- Parameters:
checkpointId- id for the checkpoint that created the local state that will be stored.localState- the local state to store.
-
getCheckpointDirectory
protected File getCheckpointDirectory(long checkpointId)
- Overrides:
getCheckpointDirectoryin classTaskLocalStateStoreImpl
-
pruneCheckpoints
public void pruneCheckpoints(LongPredicate pruningChecker, boolean breakOnceCheckerFalse)
Description copied from class:TaskLocalStateStoreImplPruning the useless checkpoints, it should be called only when holding theTaskLocalStateStoreImpl.lock.- Overrides:
pruneCheckpointsin classTaskLocalStateStoreImpl
-
dispose
public CompletableFuture<Void> dispose()
Description copied from class:TaskLocalStateStoreImplDisposes the state of all local snapshots managed by this object.- Specified by:
disposein interfaceOwnedTaskLocalStateStore- Overrides:
disposein classTaskLocalStateStoreImpl
-
toString
public String toString()
- Overrides:
toStringin classTaskLocalStateStoreImpl
-
-