Constructor and Description |
---|
CheckpointStorageLoader() |
Modifier and Type | Method and Description |
---|---|
static Optional<CheckpointStorage> |
fromConfig(ReadableConfig config,
ClassLoader classLoader,
org.slf4j.Logger logger)
Loads the checkpoint storage from the configuration, from the parameter
'state.checkpoint-storage', as defined in
CheckpointingOptions.CHECKPOINT_STORAGE . |
static CheckpointStorage |
load(CheckpointStorage fromApplication,
Path defaultSavepointDirectory,
StateBackend configuredStateBackend,
Configuration config,
ClassLoader classLoader,
org.slf4j.Logger logger)
Loads the configured
CheckpointStorage for the job based on the following precedent
rules: |
public static Optional<CheckpointStorage> fromConfig(ReadableConfig config, ClassLoader classLoader, @Nullable org.slf4j.Logger logger) throws IllegalStateException, DynamicCodeLoadingException
CheckpointingOptions.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 its CheckpointStorageFactory.createFromConfig(ReadableConfig, ClassLoader)
method is called.
Recognized shortcut names are '', and ''.
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)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
public static CheckpointStorage load(@Nullable CheckpointStorage fromApplication, @Nullable Path defaultSavepointDirectory, StateBackend configuredStateBackend, Configuration config, ClassLoader classLoader, @Nullable org.slf4j.Logger logger) throws IllegalConfigurationException, DynamicCodeLoadingException
CheckpointStorage
for the job based on the following precedent
rules:
1) If the jobs configured StateBackend
implements CheckpointStorage
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 the StreamExecutionEnvironment
.
3) Use the CheckpointStorage
instance configured via the clusters
flink-conf.yaml.
4) Load a default CheckpointStorage
instance.
fromApplication
- The checkpoint storage instance passed to the jobs
StreamExecutionEnvironment. Or null if not was set.configuredStateBackend
- The jobs configured state backend.config
- The 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).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 factoryCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.