Class CheckpointingOptions


  • @PublicEvolving
    public class CheckpointingOptions
    extends Object
    A collection of all configuration options that relate to checkpoints and savepoints.
    • Field Detail

      • CHECKPOINT_STORAGE

        public static final ConfigOption<String> CHECKPOINT_STORAGE
        The checkpoint storage used to checkpoint state for recovery.

        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 'jobmanager' and 'filesystem'.

        CHECKPOINT_STORAGE and CHECKPOINTS_DIRECTORY are usually combined to configure the checkpoint location. By default, the checkpoint meta data and actual program state will be stored in the JobManager's memory directly.

      • When CHECKPOINT_STORAGE is set to 'jobmanager', if CHECKPOINTS_DIRECTORY is configured, the meta data of checkpoints will be persisted to the path specified by CHECKPOINTS_DIRECTORY. Otherwise, the meta data will be stored in the JobManager's memory.
      • When CHECKPOINT_STORAGE is set to 'filesystem', a valid path must be configured to CHECKPOINTS_DIRECTORY, and the checkpoint meta data and actual program state will both be persisted to the path.
  • Constructor Detail

    • CheckpointingOptions

      public CheckpointingOptions()
  • Method Detail

    • isCheckpointingEnabled

      @Internal
      public static boolean isCheckpointingEnabled​(Configuration config)
      Determines whether checkpointing is enabled based on the configuration.

      Checkpointing is considered enabled if a valid checkpointing interval is configured (i.e., the interval value is greater than 0 milliseconds). If no checkpointing interval is specified or if the interval is 0 or negative, checkpointing is considered disabled.

      Parameters:
      config - the configuration to check
      Returns:
      true if checkpointing is enabled, false otherwise
    • isUnalignedCheckpointEnabled

      @Internal
      public static boolean isUnalignedCheckpointEnabled​(Configuration config)
      Determines whether unaligned checkpoints are enabled based on the configuration.

      Unaligned checkpoints can only be enabled when the checkpointing mode is set to CheckpointingMode.EXACTLY_ONCE. If the mode is CheckpointingMode.AT_LEAST_ONCE, unaligned checkpoints are not supported and this method will return false.

      When the checkpointing mode is exactly-once, this method returns the value of the ENABLE_UNALIGNED configuration option.

      Parameters:
      config - the configuration to check
      Returns:
      true if unaligned checkpoints are enabled and supported, false otherwise
      See Also:
      getCheckpointingMode(Configuration)
    • isUnalignedCheckpointInterruptibleTimersEnabled

      @Internal
      public static boolean isUnalignedCheckpointInterruptibleTimersEnabled​(Configuration config)
      Determines whether unaligned checkpoints with interruptible timers are enabled based on the configuration.

      Unaligned checkpoints with interruptible timers can only be enabled when:

      1. Unaligned checkpoints are enabled (see isUnalignedCheckpointEnabled(Configuration))
      2. The ENABLE_UNALIGNED_INTERRUPTIBLE_TIMERS option is set to true

      If unaligned checkpoints are not enabled, this method will return false regardless of the interruptible timers setting.

      Parameters:
      config - the configuration to check
      Returns:
      true if unaligned checkpoints with interruptible timers are enabled, false otherwise
      See Also:
      isUnalignedCheckpointEnabled(Configuration)