public class InputGateWithMetrics extends IndexedInputGate
InputGate provided by shuffle service and it is mainly used for
increasing general input metrics from TaskIOMetricGroup.InputGate.InputWithData<INPUT,DATA>PullingAsyncDataInput.EndOfDataStatusAvailabilityProvider.AvailabilityHelperavailabilityHelper, priorityAvailabilityHelperAVAILABLE| 构造器和说明 |
|---|
InputGateWithMetrics(IndexedInputGate inputGate,
org.apache.flink.metrics.Counter numBytesIn) |
blockConsumption, checkpointStarted, checkpointStopped, convertToPriorityEvent, getInputGateIndexgetChannelInfosclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChannelInfosand, isApproximatelyAvailable, isAvailable, orpublic InputGateWithMetrics(IndexedInputGate inputGate, org.apache.flink.metrics.Counter numBytesIn)
public CompletableFuture<?> getAvailableFuture()
getAvailableFuture 在接口中 AvailabilityProvidergetAvailableFuture 在类中 InputGateAvailabilityProvider.AVAILABLE should be returned. Previously returned
not completed futures should become completed once there are more records available.public void resumeConsumption(InputChannelInfo channelInfo) throws IOException
resumeConsumption 在接口中 CheckpointableInputresumeConsumption 在类中 InputGateIOExceptionpublic void acknowledgeAllRecordsProcessed(InputChannelInfo channelInfo) throws IOException
acknowledgeAllRecordsProcessed 在类中 InputGateIOExceptionpublic int getNumberOfInputChannels()
getNumberOfInputChannels 在接口中 CheckpointableInputgetNumberOfInputChannels 在类中 InputGatepublic InputChannel getChannel(int channelIndex)
InputGategetChannel 在类中 InputGatepublic int getGateIndex()
IndexedInputGategetGateIndex 在类中 IndexedInputGatepublic List<InputChannelInfo> getUnfinishedChannels()
IndexedInputGategetUnfinishedChannels 在类中 IndexedInputGatepublic void triggerDebloating()
triggerDebloating 在类中 IndexedInputGatepublic boolean isFinished()
isFinished 在接口中 PullingAsyncDataInput<BufferOrEvent>isFinished 在类中 InputGatepublic PullingAsyncDataInput.EndOfDataStatus hasReceivedEndOfData()
PullingAsyncDataInputMoreover it tells us the reason why there is no more data incoming. If any of the upstream
subtasks finished because of the stop-with-savepoint --no-drain, we should not drain the
input. See also StopMode.
public void setup()
throws IOException
InputGatesetup 在类中 InputGateIOExceptionpublic CompletableFuture<Void> getStateConsumedFuture()
getStateConsumedFuture 在类中 InputGatepublic void requestPartitions()
throws IOException
requestPartitions 在类中 InputGateIOExceptionpublic void setChannelStateWriter(ChannelStateWriter channelStateWriter)
ChannelStateHolderChannelStateWriter. Must only be called once.setChannelStateWriter 在接口中 ChannelStateHoldersetChannelStateWriter 在类中 InputGatepublic Optional<BufferOrEvent> getNext() throws IOException, InterruptedException
InputGateBufferOrEvent.
Note: It should be guaranteed that the previous returned buffer has been recycled before getting next one.
getNext 在类中 InputGateOptional.empty() if InputGate.isFinished() returns true.IOExceptionInterruptedExceptionpublic Optional<BufferOrEvent> pollNext() throws IOException, InterruptedException
InputGateBufferOrEvent.
Note: It should be guaranteed that the previous returned buffer has been recycled before polling next one.
pollNext 在接口中 PullingAsyncDataInput<BufferOrEvent>pollNext 在类中 InputGateOptional.empty() if there is no data to return or if InputGate.isFinished()
returns true.IOExceptionInterruptedExceptionpublic void sendTaskEvent(TaskEvent event) throws IOException
sendTaskEvent 在类中 InputGateIOExceptionpublic CompletableFuture<?> getPriorityEventAvailableFuture()
InputGateInputGate.getNext().public void finishReadRecoveredState()
throws IOException
finishReadRecoveredState 在类中 InputGateIOExceptionCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.