@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,
MailboxExecutor mailboxExecutor)
Creates a new checkpoint stream aligner.
|
CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
CheckpointBarrierHandler barrierHandler,
MailboxExecutor mailboxExecutor,
org.apache.flink.streaming.runtime.io.UpstreamRecoveryTracker upstreamRecoveryTracker) |
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() |
String |
toString() |
public CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate, CheckpointBarrierHandler barrierHandler, MailboxExecutor mailboxExecutor)
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 CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate, CheckpointBarrierHandler barrierHandler, MailboxExecutor mailboxExecutor, org.apache.flink.streaming.runtime.io.UpstreamRecoveryTracker upstreamRecoveryTracker)
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 IOException, InterruptedException
pollNext
in interface org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>
IOException
InterruptedException
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–2021 The Apache Software Foundation. All rights reserved.