Class CheckpointStorageLoader
- java.lang.Object
-
- org.apache.flink.runtime.state.CheckpointStorageLoader
-
-
Constructor Summary
Constructors Constructor Description CheckpointStorageLoader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<CheckpointStorage>
fromConfig(ReadableConfig config, ClassLoader classLoader, org.slf4j.Logger logger)
Loads the checkpoint storage from the configuration, from the parameter 'execution.checkpointing.storage', as defined inCheckpointingOptions.CHECKPOINT_STORAGE
.static CheckpointStorage
load(CheckpointStorage fromApplication, StateBackend configuredStateBackend, Configuration jobConfig, Configuration clusterConfig, ClassLoader classLoader, org.slf4j.Logger logger)
Loads the configuredCheckpointStorage
for the job based on the following precedent rules:
-
-
-
Method Detail
-
fromConfig
public static Optional<CheckpointStorage> fromConfig(ReadableConfig config, ClassLoader classLoader, @Nullable org.slf4j.Logger logger) throws IllegalStateException, DynamicCodeLoadingException
Loads the checkpoint storage from the configuration, from the parameter 'execution.checkpointing.storage', as defined inCheckpointingOptions.CHECKPOINT_STORAGE
.The implementation can be specified either via their shortcut name, or via the class name of a
CheckpointStorageFactory
. If a CheckpointStorageFactory class name is specified, the factory is instantiated (via its zero-argument constructor) and itsCheckpointStorageFactory.createFromConfig(ReadableConfig, ClassLoader)
method is called.Recognized shortcut names are '"jobmanager"', and '"filesystem"'.
- Parameters:
config
- The configuration to load the checkpoint storage fromclassLoader
- The class loader that should be used to load the checkpoint storagelogger
- Optionally, a logger to log actions to (may be null)- Returns:
- The instantiated checkpoint storage.
- Throws:
DynamicCodeLoadingException
- Thrown if a checkpoint storage factory is configured and the factory class was not found or the factory could not be instantiatedIllegalConfigurationException
- May be thrown by the CheckpointStorageFactory when creating / configuring the checkpoint storage in the factoryIllegalStateException
-
load
public static CheckpointStorage load(@Nullable CheckpointStorage fromApplication, StateBackend configuredStateBackend, Configuration jobConfig, Configuration clusterConfig, ClassLoader classLoader, @Nullable org.slf4j.Logger logger) throws IllegalConfigurationException, DynamicCodeLoadingException
Loads the configuredCheckpointStorage
for the job based on the following precedent rules:1) If the jobs configured
StateBackend
implementsCheckpointStorage
it will always be used. This is to maintain backwards compatibility with older versions of Flink that intermixed these responsibilities.2) Use the
CheckpointStorage
instance configured via theStreamExecutionEnvironment
.3) Use the
CheckpointStorage
instance configured via the clusters config.yaml.4) Load a default
CheckpointStorage
instance.- Parameters:
fromApplication
- The checkpoint storage instance passed to the jobs StreamExecutionEnvironment. Or null if not was set.configuredStateBackend
- The jobs configured state backend.jobConfig
- The job level configuration to load the checkpoint storage from.clusterConfig
- The cluster level configuration to load the checkpoint storage from.classLoader
- The class loader that should be used to load the checkpoint storage.logger
- Optionally, a logger to log actions to (may be null).- Returns:
- The configured checkpoint storage instance.
- Throws:
DynamicCodeLoadingException
- Thrown if a checkpoint storage factory is configured and the factory class was not found or the factory could not be instantiatedIllegalConfigurationException
- May be thrown by the CheckpointStorageFactory when creating / configuring the checkpoint storage in the factory
-
-