Class CheckpointedInputGate

  • All Implemented Interfaces:
    Closeable, AutoCloseable, org.apache.flink.runtime.io.AvailabilityProvider, org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>

    @Internal
    public class CheckpointedInputGate
    extends Object
    implements org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>, Closeable
    The CheckpointedInputGate uses CheckpointBarrierHandler to handle incoming CheckpointBarrier from the InputGate.
    • Constructor Detail

      • CheckpointedInputGate

        public 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.

        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.

        Parameters:
        inputGate - The input gate to draw the buffers and events from.
        barrierHandler - Handler that controls which channels are blocked.
      • CheckpointedInputGate

        public CheckpointedInputGate​(org.apache.flink.runtime.io.network.partition.consumer.InputGate inputGate,
                                     CheckpointBarrierHandler barrierHandler,
                                     org.apache.flink.api.common.operators.MailboxExecutor mailboxExecutor,
                                     UpstreamRecoveryTracker upstreamRecoveryTracker)
    • Method Detail

      • getAvailableFuture

        public CompletableFuture<?> getAvailableFuture()
        Specified by:
        getAvailableFuture in interface org.apache.flink.runtime.io.AvailabilityProvider
      • getAllBarriersReceivedFuture

        public CompletableFuture<Void> getAllBarriersReceivedFuture​(long checkpointId)
      • isFinished

        public boolean isFinished()
        Specified by:
        isFinished in interface org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>
      • hasReceivedEndOfData

        public org.apache.flink.runtime.io.PullingAsyncDataInput.EndOfDataStatus hasReceivedEndOfData()
        Specified by:
        hasReceivedEndOfData in interface org.apache.flink.runtime.io.PullingAsyncDataInput<org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent>
      • getNumberOfInputChannels

        public int getNumberOfInputChannels()
        Returns:
        number of underlying input channels.
      • getChannel

        public org.apache.flink.runtime.io.network.partition.consumer.InputChannel getChannel​(int channelIndex)
      • getChannelInfos

        public List<org.apache.flink.runtime.checkpoint.channel.InputChannelInfo> getChannelInfos()
      • allChannelsRecovered

        public boolean allChannelsRecovered()