public abstract class CheckpointBarrierHandler extends Object
CheckpointBarrierHandler
reacts to checkpoint barrier arriving from the input channels.
Different implementations may either simply track barriers, or block certain inputs on
barriers.Constructor and Description |
---|
CheckpointBarrierHandler(AbstractInvokable toNotifyOnCheckpoint) |
Modifier and Type | Method and Description |
---|---|
abstract void |
checkpointSizeLimitExceeded(long maxBufferedBytes) |
abstract long |
getAlignmentDurationNanos() |
abstract long |
getLatestCheckpointId() |
abstract boolean |
isBlocked(int channelIndex)
Checks whether the channel with the given index is blocked.
|
protected void |
notifyAbort(long checkpointId,
CheckpointException cause) |
protected void |
notifyAbortOnCancellationBarrier(long checkpointId) |
protected void |
notifyCheckpoint(CheckpointBarrier checkpointBarrier,
long bufferedBytes,
long alignmentDurationNanos) |
abstract boolean |
processBarrier(CheckpointBarrier receivedBarrier,
int channelIndex,
long bufferedBytes) |
abstract boolean |
processCancellationBarrier(CancelCheckpointMarker cancelBarrier) |
abstract boolean |
processEndOfPartition() |
abstract void |
releaseBlocksAndResetBarriers() |
public CheckpointBarrierHandler(@Nullable AbstractInvokable toNotifyOnCheckpoint)
public abstract void releaseBlocksAndResetBarriers() throws IOException
IOException
public abstract boolean isBlocked(int channelIndex)
channelIndex
- The channel index to check.public abstract boolean processBarrier(CheckpointBarrier receivedBarrier, int channelIndex, long bufferedBytes) throws Exception
Exception
public abstract boolean processCancellationBarrier(CancelCheckpointMarker cancelBarrier) throws Exception
Exception
public abstract boolean processEndOfPartition() throws Exception
Exception
public abstract long getLatestCheckpointId()
public abstract long getAlignmentDurationNanos()
public abstract void checkpointSizeLimitExceeded(long maxBufferedBytes) throws Exception
Exception
protected void notifyCheckpoint(CheckpointBarrier checkpointBarrier, long bufferedBytes, long alignmentDurationNanos) throws Exception
Exception
protected void notifyAbortOnCancellationBarrier(long checkpointId) throws Exception
Exception
protected void notifyAbort(long checkpointId, CheckpointException cause) throws Exception
Exception
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.