@Internal @NotThreadSafe public class SingleCheckpointBarrierHandler extends CheckpointBarrierHandler
SingleCheckpointBarrierHandler
is used for triggering checkpoint while reading the first
barrier and keeping track of the number of received barriers and consumed barriers. It can
handle/track just single checkpoint at a time. The behaviour when to actually trigger the
checkpoint and what the CheckpointableInput
should do is controlled by CheckpointBarrierBehaviourController
.Modifier and Type | Method and Description |
---|---|
void |
close() |
CompletableFuture<Void> |
getAllBarriersReceivedFuture(long checkpointId) |
long |
getLatestCheckpointId() |
protected boolean |
isCheckpointPending() |
void |
processBarrier(CheckpointBarrier barrier,
InputChannelInfo channelInfo) |
void |
processBarrierAnnouncement(CheckpointBarrier announcedBarrier,
int sequenceNumber,
InputChannelInfo channelInfo) |
void |
processCancellationBarrier(CancelCheckpointMarker cancelBarrier) |
void |
processEndOfPartition() |
String |
toString() |
addProcessedBytes, getAlignmentDurationNanos, getCheckpointStartDelayNanos, markAlignmentEnd, markAlignmentEnd, markAlignmentStart, markAlignmentStartAndEnd, notifyAbort, notifyAbortOnCancellationBarrier, notifyCheckpoint, resetAlignment
public void processBarrier(CheckpointBarrier barrier, InputChannelInfo channelInfo) throws IOException
processBarrier
in class CheckpointBarrierHandler
IOException
public void processBarrierAnnouncement(CheckpointBarrier announcedBarrier, int sequenceNumber, InputChannelInfo channelInfo) throws IOException
processBarrierAnnouncement
in class CheckpointBarrierHandler
IOException
public void processCancellationBarrier(CancelCheckpointMarker cancelBarrier) throws IOException
processCancellationBarrier
in class CheckpointBarrierHandler
IOException
public void processEndOfPartition() throws IOException
processEndOfPartition
in class CheckpointBarrierHandler
IOException
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
protected boolean isCheckpointPending()
isCheckpointPending
in class CheckpointBarrierHandler
public CompletableFuture<Void> getAllBarriersReceivedFuture(long checkpointId)
getAllBarriersReceivedFuture
in class CheckpointBarrierHandler
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.