Class DefaultCompletedCheckpointStoreUtils
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.DefaultCompletedCheckpointStoreUtils
-
public class DefaultCompletedCheckpointStoreUtils extends Object
Helper methods related toDefaultCompletedCheckpointStore
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getMaximumNumberOfRetainedCheckpoints(org.apache.flink.configuration.Configuration config, org.slf4j.Logger logger)
Extracts maximum number of retained checkpoints configuration from the passedConfiguration
.static <R extends ResourceVersion<R>>
Collection<CompletedCheckpoint>retrieveCompletedCheckpoints(StateHandleStore<CompletedCheckpoint,R> checkpointStateHandleStore, CheckpointStoreUtil completedCheckpointStoreUtil)
Fetch allcompleted checkpoints
from anexternal store
.
-
-
-
Method Detail
-
getMaximumNumberOfRetainedCheckpoints
public static int getMaximumNumberOfRetainedCheckpoints(org.apache.flink.configuration.Configuration config, org.slf4j.Logger logger)
Extracts maximum number of retained checkpoints configuration from the passedConfiguration
. The default value is used as a fallback if the passed value is a value larger than0
.- Parameters:
config
- The configuration that is accessed.logger
- TheLogger
used for exposing the warning if the configured value is invalid.- Returns:
- The maximum number of retained checkpoints based on the passed
Configuration
.
-
retrieveCompletedCheckpoints
public static <R extends ResourceVersion<R>> Collection<CompletedCheckpoint> retrieveCompletedCheckpoints(StateHandleStore<CompletedCheckpoint,R> checkpointStateHandleStore, CheckpointStoreUtil completedCheckpointStoreUtil) throws Exception
Fetch allcompleted checkpoints
from anexternal store
. This method is intended for retrieving an initial state ofDefaultCompletedCheckpointStore
.- Type Parameters:
R
- Type ofResourceVersion
- Parameters:
checkpointStateHandleStore
- Completed checkpoints in external store.completedCheckpointStoreUtil
- Utilities for completed checkpoint store.- Returns:
- Immutable collection of
completed checkpoints
. - Throws:
Exception
- If we're not able to fetch checkpoints for some reason.
-
-