Interface CheckpointCommittableManager<CommT>
-
- Type Parameters:
CommT- type of the committable
@Internal public interface CheckpointCommittableManager<CommT>ACheckpointCommittableManagercollects committables for one checkpoint across potentially multiple upstream subtasks.While it collects committables from multiple upstream subtasks, it belongs to exactly one committer subtask.
Each upstream subtask of this particular checkpoint is represented by a
SubtaskCommittableManager.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcommit(org.apache.flink.api.connector.sink2.Committer<CommT> committer, int maxRetries)Commits all due committables if all respective committables of the specific subtask and checkpoint have been received.longgetCheckpointId()Returns the checkpoint id in which the committables were created.intgetNumberOfSubtasks()Returns the number of upstream subtasks belonging to the checkpoint.Collection<CommT>getSuccessfulCommittables()booleanhasGloballyReceivedAll()Returns true if all committables of all upstream subtasks arrived, which is only guaranteed to happen if the DOP of the caller is 1.booleanisFinished()
-
-
-
Method Detail
-
getCheckpointId
long getCheckpointId()
Returns the checkpoint id in which the committables were created.- Returns:
- checkpoint id
-
getNumberOfSubtasks
int getNumberOfSubtasks()
Returns the number of upstream subtasks belonging to the checkpoint.
-
isFinished
boolean isFinished()
-
hasGloballyReceivedAll
boolean hasGloballyReceivedAll()
Returns true if all committables of all upstream subtasks arrived, which is only guaranteed to happen if the DOP of the caller is 1.
-
commit
void commit(org.apache.flink.api.connector.sink2.Committer<CommT> committer, int maxRetries) throws IOException, InterruptedException
Commits all due committables if all respective committables of the specific subtask and checkpoint have been received.- Parameters:
committer- used to commit to the external systemmaxRetries-- Throws:
IOExceptionInterruptedException
-
getSuccessfulCommittables
Collection<CommT> getSuccessfulCommittables()
-
-