@Internal public class CheckpointedInputGate extends Object implements org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>, Closeable
CheckpointedInputGate
uses CheckpointBarrierHandler
to handle incoming
CheckpointBarrier
from the InputGate
.Constructor and Description |
---|
CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
CheckpointBarrierHandler barrierHandler)
Creates a new checkpoint stream aligner.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleans up all internally held resources.
|
CompletableFuture<Void> |
getAllBarriersReceivedFuture(long checkpointId) |
CompletableFuture<?> |
getAvailableFuture() |
org.apache.flink.runtime.io.network.partition.consumer.InputChannel |
getChannel(int channelIndex) |
List<org.apache.flink.runtime.checkpoint.channel.InputChannelInfo> |
getChannelInfos() |
int |
getNumberOfInputChannels() |
boolean |
isFinished() |
Optional<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent> |
pollNext() |
void |
spillInflightBuffers(long checkpointId,
int channelIndex,
org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter) |
String |
toString() |
public CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate, CheckpointBarrierHandler barrierHandler)
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.barrierHandler
- Handler that controls which channels are blocked.public CompletableFuture<?> getAvailableFuture()
getAvailableFuture
in interface org.apache.flink.runtime.io.AvailabilityProvider
public 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>
Exception
public void spillInflightBuffers(long checkpointId, int channelIndex, org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter) throws IOException
IOException
public CompletableFuture<Void> getAllBarriersReceivedFuture(long checkpointId)
public boolean isFinished()
isFinished
in interface org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
- Thrown if the cleanup of I/O resources failed.public int getNumberOfInputChannels()
public org.apache.flink.runtime.io.network.partition.consumer.InputChannel getChannel(int channelIndex)
public List<org.apache.flink.runtime.checkpoint.channel.InputChannelInfo> getChannelInfos()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.