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 TypeMethodDescriptionvoidvoidcheckpointCoordinator(long checkpointId, CompletableFuture<byte[]> result) default voidnotifyCheckpointAborted(long checkpointId) We override the method here to remove the checked exception.voidnotifyCheckpointComplete(long checkpointId) We override the method here to remove the checked exception.voidresetToCheckpoint(long checkpointId, byte[] checkpointData) Resets the coordinator to the checkpoint with the given state.voidsubtaskReset(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
- 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 ofCheckpointListener.notifyCheckpointComplete(long)for more detail semantic of the method.- Specified by:
notifyCheckpointCompletein interfaceorg.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 ofCheckpointListener.notifyCheckpointAborted(long)for more detail semantic of the method.- Specified by:
notifyCheckpointAbortedin interfaceorg.apache.flink.api.common.state.CheckpointListener
-
resetToCheckpoint
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.
-