Interface OperatorCoordinatorCheckpointContext
-
- All Superinterfaces:
CheckpointListener
,OperatorInfo
- All Known Implementing Classes:
OperatorCoordinatorHolder
public interface OperatorCoordinatorCheckpointContext extends OperatorInfo, CheckpointListener
This context is the interface through which theCheckpointCoordinator
interacts with anOperatorCoordinator
during checkpointing and checkpoint restoring.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
abortCurrentTriggering()
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 Detail
-
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 ofCheckpointListener.notifyCheckpointComplete(long)
for more detail semantic of the method.- Specified by:
notifyCheckpointComplete
in interfaceCheckpointListener
- Parameters:
checkpointId
- The ID of the checkpoint that has been completed.
-
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:
notifyCheckpointAborted
in interfaceCheckpointListener
- Parameters:
checkpointId
- The ID of the checkpoint that has been aborted.
-
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.
-
-