@Internal public class CheckpointBarrierAligner extends CheckpointBarrierHandler
CheckpointBarrierAligner keep tracks of received CheckpointBarrier on given
channels and controls the alignment, by deciding which channels should be blocked and when to
release blocked channels.| Modifier and Type | Method and Description |
|---|---|
protected void |
beginNewAlignment(long checkpointId,
int channelIndex) |
void |
checkpointSizeLimitExceeded(long maxBufferedBytes) |
long |
getAlignmentDurationNanos() |
long |
getLatestCheckpointId() |
boolean |
isBlocked(int channelIndex)
Checks whether the channel with the given index is blocked.
|
protected void |
onBarrier(int channelIndex)
Blocks the given channel index, from which a barrier has been received.
|
boolean |
processBarrier(org.apache.flink.runtime.io.network.api.CheckpointBarrier receivedBarrier,
int channelIndex,
long bufferedBytes) |
boolean |
processCancellationBarrier(org.apache.flink.runtime.io.network.api.CancelCheckpointMarker cancelBarrier) |
boolean |
processEndOfPartition() |
void |
releaseBlocksAndResetBarriers() |
String |
toString() |
notifyAbort, notifyAbortOnCancellationBarrier, notifyCheckpointpublic void releaseBlocksAndResetBarriers()
releaseBlocksAndResetBarriers in class CheckpointBarrierHandlerpublic boolean isBlocked(int channelIndex)
CheckpointBarrierHandlerisBlocked in class CheckpointBarrierHandlerchannelIndex - The channel index to check.public boolean processBarrier(org.apache.flink.runtime.io.network.api.CheckpointBarrier receivedBarrier,
int channelIndex,
long bufferedBytes)
throws Exception
processBarrier in class CheckpointBarrierHandlerExceptionprotected void beginNewAlignment(long checkpointId,
int channelIndex)
throws IOException
IOExceptionprotected void onBarrier(int channelIndex)
throws IOException
channelIndex - The channel index to block.IOExceptionpublic boolean processCancellationBarrier(org.apache.flink.runtime.io.network.api.CancelCheckpointMarker cancelBarrier)
throws Exception
processCancellationBarrier in class CheckpointBarrierHandlerExceptionpublic boolean processEndOfPartition()
throws Exception
processEndOfPartition in class CheckpointBarrierHandlerExceptionpublic long getLatestCheckpointId()
getLatestCheckpointId in class CheckpointBarrierHandlerpublic long getAlignmentDurationNanos()
getAlignmentDurationNanos in class CheckpointBarrierHandlerpublic void checkpointSizeLimitExceeded(long maxBufferedBytes)
throws Exception
checkpointSizeLimitExceeded in class CheckpointBarrierHandlerExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.