Interface SubtaskCheckpointCoordinator
- All Superinterfaces:
AutoCloseable,Closeable
Coordinates checkpointing-related work for a subtask (i.e.
Task and StreamTask). Responsibilities:
- build a snapshot (invokable)
- report snapshot to the JobManager
- action upon checkpoint notification
- maintain storage locations
-
Method Summary
Modifier and TypeMethodDescriptionvoidabortCheckpointOnBarrier(long checkpointId, CheckpointException cause, OperatorChain<?, ?> operatorChain) voidcancel()Cancel all resources.voidcheckpointState(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions, CheckpointMetricsBuilder checkpointMetrics, OperatorChain<?, ?> operatorChain, boolean isTaskFinished, Supplier<Boolean> isRunning) Must be called afterinitInputsCheckpoint(long, CheckpointOptions).voidinitInputsCheckpoint(long id, CheckpointOptions checkpointOptions) Initialize new checkpoint.voidnotifyCheckpointAborted(long checkpointId, OperatorChain<?, ?> operatorChain, Supplier<Boolean> isRunning) Notified on the task side once a distributed checkpoint has been aborted.voidnotifyCheckpointComplete(long checkpointId, OperatorChain<?, ?> operatorChain, Supplier<Boolean> isRunning) Notified on the task side once a distributed checkpoint has been completed.voidnotifyCheckpointSubsumed(long checkpointId, OperatorChain<?, ?> operatorChain, Supplier<Boolean> isRunning) Notified on the task side once a distributed checkpoint has been subsumed.voidWaits for all the pending checkpoints to finish their asynchronous step.
-
Method Details
-
initInputsCheckpoint
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 ExceptionMust be called afterinitInputsCheckpoint(long, CheckpointOptions).- Throws:
Exception
-
notifyCheckpointComplete
void notifyCheckpointComplete(long checkpointId, OperatorChain<?, ?> operatorChain, Supplier<Boolean> isRunning) throws ExceptionNotified 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 ExceptionNotified 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 ExceptionNotified 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
Waits for all the pending checkpoints to finish their asynchronous step.- Throws:
Exception
-
cancel
Cancel all resources.- Throws:
IOException
-