public class TaskLocalStateStoreImpl extends Object implements OwnedTaskLocalStateStore
TaskLocalStateStore.| Modifier and Type | Field and Description |
|---|---|
static String |
TASK_STATE_SNAPSHOT_FILENAME |
| Constructor and Description |
|---|
TaskLocalStateStoreImpl(org.apache.flink.api.common.JobID jobID,
AllocationID allocationID,
JobVertexID jobVertexID,
int subtaskIndex,
LocalRecoveryConfig localRecoveryConfig,
Executor discardExecutor) |
| Modifier and Type | Method and Description |
|---|---|
void |
abortCheckpoint(long abortedCheckpointId)
Notifies that the checkpoint with the given id was confirmed as aborted.
|
void |
confirmCheckpoint(long confirmedCheckpointId)
Notifies that the checkpoint with the given id was confirmed as complete.
|
CompletableFuture<Void> |
dispose()
Disposes the state of all local snapshots managed by this object.
|
LocalRecoveryConfig |
getLocalRecoveryConfig()
Returns the
LocalRecoveryConfig for this task local state store. |
void |
pruneMatchingCheckpoints(java.util.function.LongPredicate matcher)
Remove all checkpoints from the store that match the given predicate.
|
TaskStateSnapshot |
retrieveLocalState(long checkpointID)
Returns the local state that is stored under the given checkpoint id or null if nothing was
stored under the id.
|
void |
storeLocalState(long checkpointId,
TaskStateSnapshot localState)
Stores the local state for the given checkpoint id.
|
String |
toString() |
public static final String TASK_STATE_SNAPSHOT_FILENAME
public TaskLocalStateStoreImpl(@Nonnull org.apache.flink.api.common.JobID jobID, @Nonnull AllocationID allocationID, @Nonnull JobVertexID jobVertexID, @Nonnegative int subtaskIndex, @Nonnull LocalRecoveryConfig localRecoveryConfig, @Nonnull Executor discardExecutor)
public void storeLocalState(@Nonnegative long checkpointId, @Nullable TaskStateSnapshot localState)
TaskLocalStateStorestoreLocalState in interface TaskLocalStateStorecheckpointId - id for the checkpoint that created the local state that will be stored.localState - the local state to store.@Nullable public TaskStateSnapshot retrieveLocalState(long checkpointID)
TaskLocalStateStoreretrieveLocalState in interface TaskLocalStateStorecheckpointID - the checkpoint id by which we search for local state.@Nonnull public LocalRecoveryConfig getLocalRecoveryConfig()
TaskLocalStateStoreLocalRecoveryConfig for this task local state store.getLocalRecoveryConfig in interface TaskLocalStateStorepublic void confirmCheckpoint(long confirmedCheckpointId)
TaskLocalStateStoreconfirmCheckpoint in interface TaskLocalStateStorepublic void abortCheckpoint(long abortedCheckpointId)
TaskLocalStateStoreabortCheckpoint in interface TaskLocalStateStorepublic void pruneMatchingCheckpoints(@Nonnull java.util.function.LongPredicate matcher)
TaskLocalStateStorepruneMatchingCheckpoints in interface TaskLocalStateStorematcher - the predicate that selects the checkpoints for pruning.public CompletableFuture<Void> dispose()
dispose in interface OwnedTaskLocalStateStoreCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.