Class CheckpointStorageLoader


  • @Internal
    public class CheckpointStorageLoader
    extends Object
    This class contains utility methods to load checkpoint storage from configurations.
    • Constructor Detail

      • CheckpointStorageLoader

        public CheckpointStorageLoader()
    • Method Detail

      • 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 configured 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 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 instantiated
        IllegalConfigurationException - May be thrown by the CheckpointStorageFactory when creating / configuring the checkpoint storage in the factory