@Internal public class CheckpointBarrierTracker extends CheckpointBarrierHandler
CheckpointBarrierTracker keeps track of what checkpoint barriers have been received
from which input channels. Once it has observed all checkpoint barriers for a checkpoint ID, it
notifies its listener of a completed checkpoint.
Unlike the SingleCheckpointBarrierHandler, the BarrierTracker does not block the input
channels that have sent barriers, so it cannot be used to gain "exactly-once" processing
guarantees. It can, however, be used to gain "at least once" processing guarantees.
NOTE: This implementation strictly assumes that newer checkpoints have higher checkpoint IDs.
| Constructor and Description |
|---|
CheckpointBarrierTracker(int totalNumberOfInputChannels,
org.apache.flink.runtime.jobgraph.tasks.CheckpointableTask toNotifyOnCheckpoint,
org.apache.flink.util.clock.Clock clock,
boolean enableCheckpointAfterTasksFinished) |
| Modifier and Type | Method and Description |
|---|---|
long |
getLatestCheckpointId() |
boolean |
isCheckpointPending() |
void |
processBarrier(org.apache.flink.runtime.io.network.api.CheckpointBarrier receivedBarrier,
org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo,
boolean isRpcTriggered) |
void |
processBarrierAnnouncement(org.apache.flink.runtime.io.network.api.CheckpointBarrier announcedBarrier,
int sequenceNumber,
org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo) |
void |
processCancellationBarrier(org.apache.flink.runtime.io.network.api.CancelCheckpointMarker cancelBarrier,
org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo) |
void |
processEndOfPartition(org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo) |
addProcessedBytes, close, getAlignmentDurationNanos, getAllBarriersReceivedFuture, getCheckpointStartDelayNanos, getClock, markAlignmentEnd, markAlignmentEnd, markAlignmentStart, markAlignmentStartAndEnd, notifyAbort, notifyAbortOnCancellationBarrier, notifyCheckpoint, resetAlignmentpublic CheckpointBarrierTracker(int totalNumberOfInputChannels,
org.apache.flink.runtime.jobgraph.tasks.CheckpointableTask toNotifyOnCheckpoint,
org.apache.flink.util.clock.Clock clock,
boolean enableCheckpointAfterTasksFinished)
public void processBarrier(org.apache.flink.runtime.io.network.api.CheckpointBarrier receivedBarrier,
org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo,
boolean isRpcTriggered)
throws IOException
processBarrier in class CheckpointBarrierHandlerIOExceptionpublic void processBarrierAnnouncement(org.apache.flink.runtime.io.network.api.CheckpointBarrier announcedBarrier,
int sequenceNumber,
org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo)
throws IOException
processBarrierAnnouncement in class CheckpointBarrierHandlerIOExceptionpublic void processCancellationBarrier(org.apache.flink.runtime.io.network.api.CancelCheckpointMarker cancelBarrier,
org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo)
throws IOException
processCancellationBarrier in class CheckpointBarrierHandlerIOExceptionpublic void processEndOfPartition(org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo)
throws IOException
processEndOfPartition in class CheckpointBarrierHandlerIOExceptionpublic long getLatestCheckpointId()
getLatestCheckpointId in class CheckpointBarrierHandlerpublic boolean isCheckpointPending()
isCheckpointPending in class CheckpointBarrierHandlerCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.