@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
.构造器和说明 |
---|
CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
CheckpointBarrierHandler barrierHandler,
org.apache.flink.api.common.operators.MailboxExecutor mailboxExecutor)
Creates a new checkpoint stream aligner.
|
CheckpointedInputGate(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
CheckpointBarrierHandler barrierHandler,
org.apache.flink.api.common.operators.MailboxExecutor mailboxExecutor,
UpstreamRecoveryTracker upstreamRecoveryTracker) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
allChannelsRecovered() |
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() |
org.apache.flink.runtime.io.PullingAsyncDataInput.EndOfDataStatus |
hasReceivedEndOfData() |
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, org.apache.flink.api.common.operators.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, org.apache.flink.api.common.operators.MailboxExecutor mailboxExecutor, UpstreamRecoveryTracker upstreamRecoveryTracker)
public CompletableFuture<?> getAvailableFuture()
getAvailableFuture
在接口中 org.apache.flink.runtime.io.AvailabilityProvider
public Optional<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent> pollNext() throws IOException, InterruptedException
pollNext
在接口中 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
在接口中 org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>
public org.apache.flink.runtime.io.PullingAsyncDataInput.EndOfDataStatus hasReceivedEndOfData()
hasReceivedEndOfData
在接口中 org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>
public void close() throws IOException
close
在接口中 Closeable
close
在接口中 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()
public boolean allChannelsRecovered()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.