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(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 File
getCheckpointDirectory(long checkpointId)
static Path
getLocalTaskOwnedDirectory(LocalSnapshotDirectoryProvider provider, JobID jobID)
void
pruneCheckpoints(LongPredicate pruningChecker, boolean breakOnceCheckerFalse)
Pruning the useless checkpoints, it should be called only when holding theTaskLocalStateStoreImpl.lock
.void
storeLocalState(long checkpointId, TaskStateSnapshot localState)
Stores the local state for the given checkpoint id.String
toString()
-
Methods inherited from class org.apache.flink.runtime.state.TaskLocalStateStoreImpl
abortCheckpoint, confirmCheckpoint, deleteDirectory, getLocalRecoveryConfig, getLocalRecoveryDirectoryProvider, pruneMatchingCheckpoints, retrieveLocalState
-
-
-
-
Constructor Detail
-
ChangelogTaskLocalStateStore
public ChangelogTaskLocalStateStore(@Nonnull JobID jobID, @Nonnull AllocationID allocationID, @Nonnull JobVertexID jobVertexID, @Nonnegative int subtaskIndex, @Nonnull LocalRecoveryConfig localRecoveryConfig, @Nonnull Executor discardExecutor)
-
-
Method Detail
-
getLocalTaskOwnedDirectory
public static Path getLocalTaskOwnedDirectory(LocalSnapshotDirectoryProvider provider, JobID jobID)
-
storeLocalState
public void storeLocalState(long checkpointId, @Nullable TaskStateSnapshot localState)
Description copied from interface:TaskLocalStateStore
Stores the local state for the given checkpoint id.- Specified by:
storeLocalState
in interfaceTaskLocalStateStore
- Overrides:
storeLocalState
in 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:
getCheckpointDirectory
in classTaskLocalStateStoreImpl
-
pruneCheckpoints
public void pruneCheckpoints(LongPredicate pruningChecker, boolean breakOnceCheckerFalse)
Description copied from class:TaskLocalStateStoreImpl
Pruning the useless checkpoints, it should be called only when holding theTaskLocalStateStoreImpl.lock
.- Overrides:
pruneCheckpoints
in classTaskLocalStateStoreImpl
-
dispose
public CompletableFuture<Void> dispose()
Description copied from class:TaskLocalStateStoreImpl
Disposes the state of all local snapshots managed by this object.- Specified by:
dispose
in interfaceOwnedTaskLocalStateStore
- Overrides:
dispose
in classTaskLocalStateStoreImpl
-
toString
public String toString()
- Overrides:
toString
in classTaskLocalStateStoreImpl
-
-