@Internal public class CheckpointedInputGate extends Object implements org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>
CheckpointedInputGate uses CheckpointBarrierHandler to handle incoming
CheckpointBarrier from the InputGate.| Constructor and Description |
|---|
CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
BufferStorage bufferStorage,
CheckpointBarrierHandler barrierHandler) |
CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
BufferStorage bufferStorage,
CheckpointBarrierHandler barrierHandler,
int channelIndexOffset)
Creates a new checkpoint stream aligner.
|
CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
BufferStorage bufferStorage,
String taskName,
org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable toNotifyOnCheckpoint) |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Cleans up all internally held resources.
|
long |
getAlignmentDurationNanos()
Gets the time that the latest alignment took, in nanoseconds.
|
CompletableFuture<?> |
getAvailableFuture() |
long |
getLatestCheckpointId()
Gets the ID defining the current pending, or just completed, checkpoint.
|
int |
getNumberOfInputChannels() |
boolean |
isEmpty()
Checks if the barrier handler has buffered any data internally.
|
boolean |
isFinished() |
Optional<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent> |
pollNext() |
String |
toString() |
public CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
BufferStorage bufferStorage,
String taskName,
@Nullable
org.apache.flink.runtime.jobgraph.tasks.AbstractInvokable toNotifyOnCheckpoint)
public CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
BufferStorage bufferStorage,
CheckpointBarrierHandler barrierHandler)
public CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
BufferStorage bufferStorage,
CheckpointBarrierHandler barrierHandler,
int channelIndexOffset)
The aligner will allow only alignments that buffer up to the given number of bytes. When that number is exceeded, it will stop the alignment and notify the task that the checkpoint has been cancelled.
inputGate - The input gate to draw the buffers and events from.bufferStorage - The storage to hold the buffers and events for blocked channels.barrierHandler - Handler that controls which channels are blocked.channelIndexOffset - Optional offset added to channelIndex returned from the inputGate
before passing it to the barrierHandler.public CompletableFuture<?> getAvailableFuture()
getAvailableFuture in interface org.apache.flink.runtime.io.AvailabilityProviderpublic Optional<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent> pollNext() throws Exception
pollNext in interface org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>Exceptionpublic boolean isEmpty()
True, if no data is buffered internally, false otherwise.public boolean isFinished()
isFinished in interface org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>public void cleanup()
throws IOException
IOException - Thrown if the cleanup of I/O resources failed.public long getLatestCheckpointId()
public long getAlignmentDurationNanos()
public int getNumberOfInputChannels()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.