Class CheckpointBarrierHandler
java.lang.Object
org.apache.flink.streaming.runtime.io.checkpointing.CheckpointBarrierHandler
- All Implemented Interfaces:
Closeable,AutoCloseable
- Direct Known Subclasses:
CheckpointBarrierTracker,SingleCheckpointBarrierHandler
The
CheckpointBarrierHandler reacts to checkpoint barrier arriving from the input
channels. Different implementations may either simply track barriers, or block certain inputs on
barriers.-
Constructor Summary
ConstructorsConstructorDescriptionCheckpointBarrierHandler(CheckpointableTask toNotifyOnCheckpoint, org.apache.flink.util.clock.Clock clock, boolean enableCheckpointAfterTasksFinished) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProcessedBytes(int bytes) voidclose()longgetAllBarriersReceivedFuture(long checkpointId) longprotected final org.apache.flink.util.clock.ClockgetClock()abstract longprotected abstract booleanprotected voidprotected voidmarkAlignmentEnd(long alignmentDuration) protected voidmarkAlignmentStart(long checkpointId, long checkpointCreationTimestamp) protected voidmarkAlignmentStartAndEnd(long checkpointId, long checkpointCreationTimestamp) protected voidnotifyAbort(long checkpointId, CheckpointException cause) protected voidnotifyAbortOnCancellationBarrier(long checkpointId) protected voidnotifyCheckpoint(CheckpointBarrier checkpointBarrier) abstract voidprocessBarrier(CheckpointBarrier receivedBarrier, InputChannelInfo channelInfo, boolean isRpcTriggered) abstract voidprocessBarrierAnnouncement(CheckpointBarrier announcedBarrier, int sequenceNumber, InputChannelInfo channelInfo) abstract voidprocessCancellationBarrier(CancelCheckpointMarker cancelBarrier, InputChannelInfo channelInfo) abstract voidprocessEndOfPartition(InputChannelInfo channelInfo) protected void
-
Constructor Details
-
CheckpointBarrierHandler
public CheckpointBarrierHandler(CheckpointableTask toNotifyOnCheckpoint, org.apache.flink.util.clock.Clock clock, boolean enableCheckpointAfterTasksFinished)
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
processBarrier
public abstract void processBarrier(CheckpointBarrier receivedBarrier, InputChannelInfo channelInfo, boolean isRpcTriggered) throws IOException - Throws:
IOException
-
processBarrierAnnouncement
public abstract void processBarrierAnnouncement(CheckpointBarrier announcedBarrier, int sequenceNumber, InputChannelInfo channelInfo) throws IOException - Throws:
IOException
-
processCancellationBarrier
public abstract void processCancellationBarrier(CancelCheckpointMarker cancelBarrier, InputChannelInfo channelInfo) throws IOException - Throws:
IOException
-
processEndOfPartition
- Throws:
IOException
-
getLatestCheckpointId
public abstract long getLatestCheckpointId() -
getAlignmentDurationNanos
public long getAlignmentDurationNanos() -
getCheckpointStartDelayNanos
public long getCheckpointStartDelayNanos() -
getAllBarriersReceivedFuture
-
notifyCheckpoint
- Throws:
IOException
-
notifyAbortOnCancellationBarrier
- Throws:
IOException
-
notifyAbort
- Throws:
IOException
-
markAlignmentStartAndEnd
protected void markAlignmentStartAndEnd(long checkpointId, long checkpointCreationTimestamp) -
markAlignmentStart
protected void markAlignmentStart(long checkpointId, long checkpointCreationTimestamp) -
markAlignmentEnd
protected void markAlignmentEnd() -
markAlignmentEnd
protected void markAlignmentEnd(long alignmentDuration) -
resetAlignment
protected void resetAlignment() -
isCheckpointPending
protected abstract boolean isCheckpointPending() -
addProcessedBytes
public void addProcessedBytes(int bytes) -
getClock
protected final org.apache.flink.util.clock.Clock getClock()
-