use of org.apache.flink.streaming.runtime.io.checkpointing.CheckpointBarrierHandler in project flink by apache.
the class StreamTask method triggerUnfinishedChannelsCheckpoint.
private boolean triggerUnfinishedChannelsCheckpoint(CheckpointMetaData checkpointMetaData, CheckpointOptions checkpointOptions) throws Exception {
Optional<CheckpointBarrierHandler> checkpointBarrierHandler = getCheckpointBarrierHandler();
checkState(checkpointBarrierHandler.isPresent(), "CheckpointBarrier should exist for tasks with network inputs.");
CheckpointBarrier barrier = new CheckpointBarrier(checkpointMetaData.getCheckpointId(), checkpointMetaData.getTimestamp(), checkpointOptions);
for (IndexedInputGate inputGate : getEnvironment().getAllInputGates()) {
if (!inputGate.isFinished()) {
for (InputChannelInfo channelInfo : inputGate.getUnfinishedChannels()) {
checkpointBarrierHandler.get().processBarrier(barrier, channelInfo, true);
}
}
}
return true;
}
Aggregations