Interface SubtaskCheckpointCoordinator
-
- All Superinterfaces:
AutoCloseable
,Closeable
@Internal public interface SubtaskCheckpointCoordinator extends Closeable
Coordinates checkpointing-related work for a subtask (i.e.Task
andStreamTask
). Responsibilities:- build a snapshot (invokable)
- report snapshot to the JobManager
- action upon checkpoint notification
- maintain storage locations
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
abortCheckpointOnBarrier(long checkpointId, CheckpointException cause, OperatorChain<?,?> operatorChain)
void
cancel()
Cancel all resources.void
checkpointState(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, CheckpointMetricsBuilder checkpointMetrics, OperatorChain<?,?> operatorChain, boolean isTaskFinished, Supplier<Boolean> isRunning)
Must be called afterinitInputsCheckpoint(long, CheckpointOptions)
.ChannelStateWriter
getChannelStateWriter()
CheckpointStorageWorkerView
getCheckpointStorage()
void
initInputsCheckpoint(long id, CheckpointOptions checkpointOptions)
Initialize new checkpoint.void
notifyCheckpointAborted(long checkpointId, OperatorChain<?,?> operatorChain, Supplier<Boolean> isRunning)
Notified on the task side once a distributed checkpoint has been aborted.void
notifyCheckpointComplete(long checkpointId, OperatorChain<?,?> operatorChain, Supplier<Boolean> isRunning)
Notified on the task side once a distributed checkpoint has been completed.void
notifyCheckpointSubsumed(long checkpointId, OperatorChain<?,?> operatorChain, Supplier<Boolean> isRunning)
Notified on the task side once a distributed checkpoint has been subsumed.void
waitForPendingCheckpoints()
Waits for all the pending checkpoints to finish their asynchronous step.
-
-
-
Method Detail
-
initInputsCheckpoint
void initInputsCheckpoint(long id, CheckpointOptions checkpointOptions) throws CheckpointException
Initialize new checkpoint.- Throws:
CheckpointException
-
getChannelStateWriter
ChannelStateWriter getChannelStateWriter()
-
getCheckpointStorage
CheckpointStorageWorkerView getCheckpointStorage()
-
abortCheckpointOnBarrier
void abortCheckpointOnBarrier(long checkpointId, CheckpointException cause, OperatorChain<?,?> operatorChain) throws IOException
- Throws:
IOException
-
checkpointState
void checkpointState(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, CheckpointMetricsBuilder checkpointMetrics, OperatorChain<?,?> operatorChain, boolean isTaskFinished, Supplier<Boolean> isRunning) throws Exception
Must be called afterinitInputsCheckpoint(long, CheckpointOptions)
.- Throws:
Exception
-
notifyCheckpointComplete
void notifyCheckpointComplete(long checkpointId, OperatorChain<?,?> operatorChain, 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, 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, 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
-
cancel
void cancel() throws IOException
Cancel all resources.- Throws:
IOException
-
-