public class StandaloneCompletedCheckpointStore extends AbstractCompleteCheckpointStore
CompletedCheckpointStore for JobManagers running in HighAvailabilityMode.NONE.| 构造器和说明 |
|---|
StandaloneCompletedCheckpointStore(int maxNumberOfCheckpointsToRetain) |
StandaloneCompletedCheckpointStore(int maxNumberOfCheckpointsToRetain,
SharedStateRegistryFactory sharedStateRegistryFactory,
Executor ioExecutor,
RestoreMode restoreMode)
Creates
StandaloneCompletedCheckpointStore. |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
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.
|
getSharedStateRegistry, unregisterUnusedStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLatestCheckpoint, getLatestCheckpointId@VisibleForTesting public StandaloneCompletedCheckpointStore(int maxNumberOfCheckpointsToRetain)
public StandaloneCompletedCheckpointStore(int maxNumberOfCheckpointsToRetain,
SharedStateRegistryFactory sharedStateRegistryFactory,
Executor ioExecutor,
RestoreMode restoreMode)
StandaloneCompletedCheckpointStore.restoreMode - maxNumberOfCheckpointsToRetain - The maximum number of checkpoints to retain (at least
1). Adding more checkpoints than this results in older checkpoints being discarded.@Nullable public CompletedCheckpoint addCheckpointAndSubsumeOldestOne(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.
Exceptionpublic List<CompletedCheckpoint> getAllCheckpoints()
CompletedCheckpointStoreCompletedCheckpoint instances.
Returns an empty list if no checkpoint has been added yet.
public int getNumberOfRetainedCheckpoints()
CompletedCheckpointStorepublic int getMaxNumberOfRetainedCheckpoints()
CompletedCheckpointStorepublic 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 在接口中 CompletedCheckpointStoreshutdown 在类中 AbstractCompleteCheckpointStorejobStatus - Job state on shut downcheckpointsCleaner - that will cleanup completed checkpoints if neededExceptionpublic boolean requiresExternalizedCheckpoints()
CompletedCheckpointStoreCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.