public class EmbeddedCompletedCheckpointStore extends Object implements CompletedCheckpointStore
LOG| Constructor and Description |
|---|
EmbeddedCompletedCheckpointStore() |
EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints) |
EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints,
Collection<CompletedCheckpoint> initialCheckpoints) |
| 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. |
int |
getMaxNumberOfRetainedCheckpoints()
Returns the max number of retained checkpoints.
|
int |
getNumberOfRetainedCheckpoints()
Returns the current number of retained checkpoints.
|
Optional<org.apache.flink.api.common.JobStatus> |
getShutdownStatus() |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLatestCheckpoint, getLatestCheckpointIdpublic EmbeddedCompletedCheckpointStore()
public EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints)
public EmbeddedCompletedCheckpointStore(int maxRetainedCheckpoints,
Collection<CompletedCheckpoint> initialCheckpoints)
public void addCheckpoint(CompletedCheckpoint checkpoint, CheckpointsCleaner checkpointsCleaner, Runnable postCleanup) throws Exception
CompletedCheckpointStoreCompletedCheckpoint 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.
addCheckpoint in interface CompletedCheckpointStoreExceptionpublic void shutdown(org.apache.flink.api.common.JobStatus jobStatus,
CheckpointsCleaner checkpointsCleaner)
throws Exception
CompletedCheckpointStoreThe job status is forwarded and used to decide whether state should actually be discarded or kept.
shutdown in interface CompletedCheckpointStorejobStatus - Job state on shut downcheckpointsCleaner - that will cleanup completed checkpoints if neededExceptionpublic List<CompletedCheckpoint> getAllCheckpoints()
CompletedCheckpointStoreCompletedCheckpoint instances.
Returns an empty list if no checkpoint has been added yet.
getAllCheckpoints in interface CompletedCheckpointStorepublic int getNumberOfRetainedCheckpoints()
CompletedCheckpointStoregetNumberOfRetainedCheckpoints in interface CompletedCheckpointStorepublic int getMaxNumberOfRetainedCheckpoints()
CompletedCheckpointStoregetMaxNumberOfRetainedCheckpoints in interface CompletedCheckpointStorepublic boolean requiresExternalizedCheckpoints()
CompletedCheckpointStorerequiresExternalizedCheckpoints in interface CompletedCheckpointStore@VisibleForTesting public Optional<org.apache.flink.api.common.JobStatus> getShutdownStatus()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.