@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
.构造器和说明 |
---|
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) |
限定符和类型 | 方法和说明 |
---|---|
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
在接口中 org.apache.flink.runtime.io.AvailabilityProvider
public Optional<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent> pollNext() throws Exception
pollNext
在接口中 org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>
Exception
public boolean isEmpty()
True
, if no data is buffered internally, false
otherwise.public boolean isFinished()
isFinished
在接口中 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.