public class EmbeddedCompletedCheckpointStore extends AbstractCompleteCheckpointStore
LOG
Constructor and Description |
---|
EmbeddedCompletedCheckpointStore() |
EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints) |
EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints,
Collection<CompletedCheckpoint> initialCheckpoints,
RestoreMode restoreMode) |
EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints,
Collection<CompletedCheckpoint> initialCheckpoints,
SharedStateRegistry sharedStateRegistry) |
Modifier and Type | Method and Description |
---|---|
CompletedCheckpoint |
addCheckpointAndSubsumeOldestOne(CompletedCheckpoint checkpoint,
CheckpointsCleaner checkpointsCleaner,
Runnable postCleanup)
Adds a
CompletedCheckpoint instance to the list of completed checkpoints. |
List<CompletedCheckpoint> |
getAllCheckpoints()
Returns all
CompletedCheckpoint instances. |
int |
getMaxNumberOfRetainedCheckpoints()
Returns the max number of retained checkpoints.
|
int |
getNumberOfRetainedCheckpoints()
Returns the current number of retained checkpoints.
|
Optional<JobStatus> |
getShutdownStatus() |
boolean |
requiresExternalizedCheckpoints()
This method returns whether the completed checkpoint store requires checkpoints to be
externalized.
|
void |
shutdown(JobStatus jobStatus,
CheckpointsCleaner checkpointsCleaner)
Shuts down the store.
|
getSharedStateRegistry, unregisterUnusedState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLatestCheckpoint, getLatestCheckpointId
@VisibleForTesting public EmbeddedCompletedCheckpointStore()
@VisibleForTesting public EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints)
public EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints, Collection<CompletedCheckpoint> initialCheckpoints, RestoreMode restoreMode)
public EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints, Collection<CompletedCheckpoint> initialCheckpoints, SharedStateRegistry sharedStateRegistry)
public CompletedCheckpoint addCheckpointAndSubsumeOldestOne(CompletedCheckpoint checkpoint, CheckpointsCleaner checkpointsCleaner, Runnable postCleanup) throws Exception
CompletedCheckpointStore
CompletedCheckpoint
instance to the list of completed checkpoints.
Only a bounded number of checkpoints is kept. When exceeding the maximum number of retained checkpoints, the oldest one will be discarded.
Exception
public void shutdown(JobStatus jobStatus, CheckpointsCleaner checkpointsCleaner) throws Exception
CompletedCheckpointStore
The job status is forwarded and used to decide whether state should actually be discarded or kept.
shutdown
in interface CompletedCheckpointStore
shutdown
in class AbstractCompleteCheckpointStore
jobStatus
- Job state on shut downcheckpointsCleaner
- that will cleanup completed checkpoints if neededException
public List<CompletedCheckpoint> getAllCheckpoints()
CompletedCheckpointStore
CompletedCheckpoint
instances.
Returns an empty list if no checkpoint has been added yet.
public int getNumberOfRetainedCheckpoints()
CompletedCheckpointStore
public int getMaxNumberOfRetainedCheckpoints()
CompletedCheckpointStore
public boolean requiresExternalizedCheckpoints()
CompletedCheckpointStore
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.