public interface CompletedCheckpointStore
CompletedCheckpoint instances.| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
| Modifier and Type | Method and Description |
|---|---|
void |
addCheckpoint(CompletedCheckpoint checkpoint,
CheckpointsCleaner checkpointsCleaner,
Runnable postCleanup)
Adds a
CompletedCheckpoint instance to the list of completed checkpoints. |
List<CompletedCheckpoint> |
getAllCheckpoints()
Returns all
CompletedCheckpoint instances. |
default CompletedCheckpoint |
getLatestCheckpoint(boolean isPreferCheckpointForRecovery)
Returns the latest
CompletedCheckpoint instance or null if none was
added. |
int |
getMaxNumberOfRetainedCheckpoints()
Returns the max number of retained checkpoints.
|
int |
getNumberOfRetainedCheckpoints()
Returns the current number of retained checkpoints.
|
void |
recover()
Recover available
CompletedCheckpoint instances. |
boolean |
requiresExternalizedCheckpoints()
This method returns whether the completed checkpoint store requires checkpoints to be
externalized.
|
void |
shutdown(org.apache.flink.api.common.JobStatus jobStatus,
CheckpointsCleaner checkpointsCleaner)
Shuts down the store.
|
static CompletedCheckpointStore |
storeFor(Runnable postCleanupAction,
CompletedCheckpoint... checkpoints) |
void recover()
throws Exception
CompletedCheckpoint instances.
After a call to this method, getLatestCheckpoint(boolean) returns the latest
available checkpoint.
Exceptionvoid addCheckpoint(CompletedCheckpoint checkpoint, CheckpointsCleaner checkpointsCleaner, Runnable postCleanup) throws Exception
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.
Exceptiondefault CompletedCheckpoint getLatestCheckpoint(boolean isPreferCheckpointForRecovery) throws Exception
CompletedCheckpoint instance or null if none was
added.Exceptionvoid shutdown(org.apache.flink.api.common.JobStatus jobStatus,
CheckpointsCleaner checkpointsCleaner)
throws Exception
The job status is forwarded and used to decide whether state should actually be discarded or kept.
jobStatus - Job state on shut downcheckpointsCleaner - that will cleanup copmpleted checkpoints if neededExceptionList<CompletedCheckpoint> getAllCheckpoints() throws Exception
CompletedCheckpoint instances.
Returns an empty list if no checkpoint has been added yet.
Exceptionint getNumberOfRetainedCheckpoints()
int getMaxNumberOfRetainedCheckpoints()
boolean requiresExternalizedCheckpoints()
@VisibleForTesting static CompletedCheckpointStore storeFor(Runnable postCleanupAction, CompletedCheckpoint... checkpoints) throws Exception
ExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.