@Internal @NotThreadSafe public class CheckpointBarrierUnaligner extends CheckpointBarrierHandler
CheckpointBarrierUnaligner
is used for triggering checkpoint while reading the first
barrier and keeping track of the number of received barriers and consumed barriers.Modifier and Type | Method and Description |
---|---|
void |
abortPendingCheckpoint(long checkpointId,
CheckpointException exception) |
void |
close() |
CompletableFuture<Void> |
getAllBarriersReceivedFuture(long checkpointId) |
Optional<BufferReceivedListener> |
getBufferReceivedListener() |
long |
getLatestCheckpointId() |
boolean |
hasInflightData(long checkpointId,
InputChannelInfo channelInfo)
Returns true if there is in-flight data in the buffers for the given channel and checkpoint.
|
protected boolean |
isCheckpointPending() |
void |
processBarrier(CheckpointBarrier receivedBarrier,
InputChannelInfo channelInfo)
We still need to trigger checkpoint via
ThreadSafeUnaligner#notifyBarrierReceived(CheckpointBarrier, InputChannelInfo) while reading
the first barrier from one channel, because this might happen earlier than the previous async
trigger via mailbox by netty thread. |
void |
processCancellationBarrier(CancelCheckpointMarker cancelBarrier) |
void |
processEndOfPartition() |
String |
toString() |
executeInTaskThread, getAlignmentDurationNanos, getCheckpointStartDelayNanos, isBlocked, markCheckpointStart, notifyAbort, notifyAbortOnCancellationBarrier, notifyCheckpoint, releaseBlocksAndResetBarriers
public void processBarrier(CheckpointBarrier receivedBarrier, InputChannelInfo channelInfo) throws Exception
ThreadSafeUnaligner#notifyBarrierReceived(CheckpointBarrier, InputChannelInfo)
while reading
the first barrier from one channel, because this might happen earlier than the previous async
trigger via mailbox by netty thread.
Note this is also suitable for the trigger case of local input channel.
processBarrier
in class CheckpointBarrierHandler
Exception
public void abortPendingCheckpoint(long checkpointId, CheckpointException exception) throws IOException
abortPendingCheckpoint
in class CheckpointBarrierHandler
IOException
public void processCancellationBarrier(CancelCheckpointMarker cancelBarrier) throws Exception
processCancellationBarrier
in class CheckpointBarrierHandler
Exception
public void processEndOfPartition() throws Exception
processEndOfPartition
in class CheckpointBarrierHandler
Exception
public long getLatestCheckpointId()
getLatestCheckpointId
in class CheckpointBarrierHandler
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class CheckpointBarrierHandler
IOException
public boolean hasInflightData(long checkpointId, InputChannelInfo channelInfo)
CheckpointBarrierHandler
hasInflightData
in class CheckpointBarrierHandler
public CompletableFuture<Void> getAllBarriersReceivedFuture(long checkpointId)
getAllBarriersReceivedFuture
in class CheckpointBarrierHandler
public Optional<BufferReceivedListener> getBufferReceivedListener()
getBufferReceivedListener
in class CheckpointBarrierHandler
protected boolean isCheckpointPending()
isCheckpointPending
in class CheckpointBarrierHandler
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.