Interface OperatorCoordinatorCheckpointContext

All Superinterfaces:
org.apache.flink.api.common.state.CheckpointListener, OperatorInfo
All Known Implementing Classes:
OperatorCoordinatorHolder

public interface OperatorCoordinatorCheckpointContext extends OperatorInfo, org.apache.flink.api.common.state.CheckpointListener
This context is the interface through which the CheckpointCoordinator interacts with an OperatorCoordinator during checkpointing and checkpoint restoring.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    checkpointCoordinator(long checkpointId, CompletableFuture<byte[]> result)
     
    default void
    notifyCheckpointAborted(long checkpointId)
    We override the method here to remove the checked exception.
    void
    notifyCheckpointComplete(long checkpointId)
    We override the method here to remove the checked exception.
    void
    resetToCheckpoint(long checkpointId, byte[] checkpointData)
    Resets the coordinator to the checkpoint with the given state.
    void
    subtaskReset(int subtask, long checkpointId)
    Called if a task is recovered as part of a partial failover, meaning a failover handled by the scheduler's failover strategy (by default recovering a pipelined region).

    Methods inherited from interface org.apache.flink.runtime.operators.coordination.OperatorInfo

    currentParallelism, maxParallelism, operatorId
  • Method Details

    • checkpointCoordinator

      void checkpointCoordinator(long checkpointId, CompletableFuture<byte[]> result) throws Exception
      Throws:
      Exception
    • abortCurrentTriggering

      void abortCurrentTriggering()
    • notifyCheckpointComplete

      void notifyCheckpointComplete(long checkpointId)
      We override the method here to remove the checked exception. Please check the Java docs of CheckpointListener.notifyCheckpointComplete(long) for more detail semantic of the method.
      Specified by:
      notifyCheckpointComplete in interface org.apache.flink.api.common.state.CheckpointListener
    • notifyCheckpointAborted

      default void notifyCheckpointAborted(long checkpointId)
      We override the method here to remove the checked exception. Please check the Java docs of CheckpointListener.notifyCheckpointAborted(long) for more detail semantic of the method.
      Specified by:
      notifyCheckpointAborted in interface org.apache.flink.api.common.state.CheckpointListener
    • resetToCheckpoint

      void resetToCheckpoint(long checkpointId, @Nullable byte[] checkpointData) throws Exception
      Resets the coordinator to the checkpoint with the given state.

      This method is called with a null state argument in the following situations:

      • There is a recovery and there was no completed checkpoint yet.
      • There is a recovery from a completed checkpoint/savepoint but it contained no state for the coordinator.

      In both cases, the coordinator should reset to an empty (new) state.

      Throws:
      Exception
    • subtaskReset

      void subtaskReset(int subtask, long checkpointId)
      Called if a task is recovered as part of a partial failover, meaning a failover handled by the scheduler's failover strategy (by default recovering a pipelined region). The method is invoked for each subtask involved in that partial failover.

      In contrast to this method, the resetToCheckpoint(long, byte[]) method is called in the case of a global failover, which is the case when the coordinator (JobManager) is recovered.