Interface SubtaskCheckpointCoordinator

  • All Superinterfaces:
    AutoCloseable, Closeable

    @Internal
    public interface SubtaskCheckpointCoordinator
    extends Closeable
    Coordinates checkpointing-related work for a subtask (i.e. Task and StreamTask). Responsibilities:
    1. build a snapshot (invokable)
    2. report snapshot to the JobManager
    3. action upon checkpoint notification
    4. maintain storage locations
    • Method Detail

      • initInputsCheckpoint

        void initInputsCheckpoint​(long id,
                                  org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions)
                           throws org.apache.flink.runtime.checkpoint.CheckpointException
        Initialize new checkpoint.
        Throws:
        org.apache.flink.runtime.checkpoint.CheckpointException
      • getChannelStateWriter

        org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter getChannelStateWriter()
      • getCheckpointStorage

        org.apache.flink.runtime.state.CheckpointStorageWorkerView getCheckpointStorage()
      • abortCheckpointOnBarrier

        void abortCheckpointOnBarrier​(long checkpointId,
                                      org.apache.flink.runtime.checkpoint.CheckpointException cause,
                                      OperatorChain<?,​?> operatorChain)
                               throws IOException
        Throws:
        IOException
      • checkpointState

        void checkpointState​(org.apache.flink.runtime.checkpoint.CheckpointMetaData checkpointMetaData,
                             org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions,
                             org.apache.flink.runtime.checkpoint.CheckpointMetricsBuilder checkpointMetrics,
                             OperatorChain<?,​?> operatorChain,
                             boolean isTaskFinished,
                             java.util.function.Supplier<Boolean> isRunning)
                      throws Exception
        Throws:
        Exception
      • notifyCheckpointComplete

        void notifyCheckpointComplete​(long checkpointId,
                                      OperatorChain<?,​?> operatorChain,
                                      java.util.function.Supplier<Boolean> isRunning)
                               throws Exception
        Notified on the task side once a distributed checkpoint has been completed.
        Parameters:
        checkpointId - The checkpoint id to notify as been completed.
        operatorChain - The chain of operators executed by the task.
        isRunning - Whether the task is running.
        Throws:
        Exception
      • notifyCheckpointAborted

        void notifyCheckpointAborted​(long checkpointId,
                                     OperatorChain<?,​?> operatorChain,
                                     java.util.function.Supplier<Boolean> isRunning)
                              throws Exception
        Notified on the task side once a distributed checkpoint has been aborted.
        Parameters:
        checkpointId - The checkpoint id to notify as been completed.
        operatorChain - The chain of operators executed by the task.
        isRunning - Whether the task is running.
        Throws:
        Exception
      • notifyCheckpointSubsumed

        void notifyCheckpointSubsumed​(long checkpointId,
                                      OperatorChain<?,​?> operatorChain,
                                      java.util.function.Supplier<Boolean> isRunning)
                               throws Exception
        Notified on the task side once a distributed checkpoint has been subsumed.
        Parameters:
        checkpointId - The checkpoint id to notify as been subsumed.
        operatorChain - The chain of operators executed by the task.
        isRunning - Whether the task is running.
        Throws:
        Exception
      • waitForPendingCheckpoints

        void waitForPendingCheckpoints()
                                throws Exception
        Waits for all the pending checkpoints to finish their asynchronous step.
        Throws:
        Exception