public class StandaloneCompletedCheckpointStore extends Object implements CompletedCheckpointStore
CompletedCheckpointStore for JobManagers running in HighAvailabilityMode.NONE.| Constructor and Description |
|---|
StandaloneCompletedCheckpointStore(int maxNumberOfCheckpointsToRetain)
Creates
StandaloneCompletedCheckpointStore. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCheckpoint(CompletedCheckpoint checkpoint)
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.
|
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)
Shuts down the store.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLatestCheckpointpublic StandaloneCompletedCheckpointStore(int maxNumberOfCheckpointsToRetain)
StandaloneCompletedCheckpointStore.maxNumberOfCheckpointsToRetain - The maximum number of checkpoints to retain (at
least 1). Adding more checkpoints than this results
in older checkpoints being discarded.public void recover()
throws Exception
CompletedCheckpointStoreCompletedCheckpoint instances.
After a call to this method, CompletedCheckpointStore.getLatestCheckpoint(boolean) returns the latest
available checkpoint.
recover in interface CompletedCheckpointStoreExceptionpublic void addCheckpoint(CompletedCheckpoint checkpoint) 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 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 void shutdown(org.apache.flink.api.common.JobStatus jobStatus)
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 downExceptionpublic boolean requiresExternalizedCheckpoints()
CompletedCheckpointStorerequiresExternalizedCheckpoints in interface CompletedCheckpointStoreCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.