public abstract class CheckpointBarrierHandler extends Object implements Closeable
CheckpointBarrierHandler reacts to checkpoint barrier arriving from the input
channels. Different implementations may either simply track barriers, or block certain inputs on
barriers.| 构造器和说明 |
|---|
CheckpointBarrierHandler(org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable toNotifyOnCheckpoint) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
abortPendingCheckpoint(long checkpointId,
org.apache.flink.runtime.checkpoint.CheckpointException exception) |
void |
close() |
protected <E extends Exception> |
executeInTaskThread(org.apache.flink.util.function.ThrowingRunnable<E> runnable,
String descriptionFormat,
Object... descriptionArgs) |
long |
getAlignmentDurationNanos() |
CompletableFuture<Void> |
getAllBarriersReceivedFuture(long checkpointId) |
Optional<org.apache.flink.runtime.io.network.buffer.BufferReceivedListener> |
getBufferReceivedListener() |
long |
getCheckpointStartDelayNanos() |
abstract long |
getLatestCheckpointId() |
boolean |
hasInflightData(long checkpointId,
org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo)
Returns true if there is in-flight data in the buffers for the given channel and checkpoint.
|
boolean |
isBlocked(org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo)
Checks whether the channel with the given index is blocked.
|
protected abstract boolean |
isCheckpointPending() |
protected void |
markCheckpointStart(long checkpointCreationTimestamp) |
protected void |
notifyAbort(long checkpointId,
org.apache.flink.runtime.checkpoint.CheckpointException cause) |
protected void |
notifyAbortOnCancellationBarrier(long checkpointId) |
protected void |
notifyCheckpoint(org.apache.flink.runtime.io.network.api.CheckpointBarrier checkpointBarrier,
long alignmentDurationNanos) |
abstract void |
processBarrier(org.apache.flink.runtime.io.network.api.CheckpointBarrier receivedBarrier,
org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo) |
abstract void |
processCancellationBarrier(org.apache.flink.runtime.io.network.api.CancelCheckpointMarker cancelBarrier) |
abstract void |
processEndOfPartition() |
void |
releaseBlocksAndResetBarriers() |
public CheckpointBarrierHandler(org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable toNotifyOnCheckpoint)
public void releaseBlocksAndResetBarriers()
throws IOException
IOExceptionpublic boolean isBlocked(org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo)
channelInfo - The channel index to check.public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionpublic abstract void processBarrier(org.apache.flink.runtime.io.network.api.CheckpointBarrier receivedBarrier,
org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo)
throws Exception
Exceptionpublic abstract void processCancellationBarrier(org.apache.flink.runtime.io.network.api.CancelCheckpointMarker cancelBarrier)
throws Exception
Exceptionpublic abstract long getLatestCheckpointId()
public long getAlignmentDurationNanos()
public long getCheckpointStartDelayNanos()
public Optional<org.apache.flink.runtime.io.network.buffer.BufferReceivedListener> getBufferReceivedListener()
public boolean hasInflightData(long checkpointId,
org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo)
public CompletableFuture<Void> getAllBarriersReceivedFuture(long checkpointId)
protected void notifyCheckpoint(org.apache.flink.runtime.io.network.api.CheckpointBarrier checkpointBarrier,
long alignmentDurationNanos)
throws IOException
IOExceptionprotected void notifyAbortOnCancellationBarrier(long checkpointId)
throws IOException
IOExceptionprotected void notifyAbort(long checkpointId,
org.apache.flink.runtime.checkpoint.CheckpointException cause)
throws IOException
IOExceptionprotected void markCheckpointStart(long checkpointCreationTimestamp)
protected <E extends Exception> void executeInTaskThread(org.apache.flink.util.function.ThrowingRunnable<E> runnable, String descriptionFormat, Object... descriptionArgs) throws E extends Exception
E extends Exceptionprotected abstract boolean isCheckpointPending()
protected void abortPendingCheckpoint(long checkpointId,
org.apache.flink.runtime.checkpoint.CheckpointException exception)
throws IOException
IOExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.