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>
AvailabilityProvider.AvailabilityHelper
availabilityHelper, priorityAvailabilityHelper
AVAILABLE
构造器和说明 |
---|
InputGateWithMetrics(IndexedInputGate inputGate,
org.apache.flink.metrics.Counter numBytesIn) |
限定符和类型 | 方法和说明 |
---|---|
void |
close() |
void |
finishReadRecoveredState() |
CompletableFuture<?> |
getAvailableFuture() |
InputChannel |
getChannel(int channelIndex)
Returns the channel of this gate.
|
int |
getGateIndex()
Returns the index of this input gate.
|
Optional<BufferOrEvent> |
getNext()
Blocking call waiting for next
BufferOrEvent . |
int |
getNumberOfInputChannels() |
CompletableFuture<?> |
getPriorityEventAvailableFuture()
Notifies when a priority event has been enqueued.
|
CompletableFuture<Void> |
getStateConsumedFuture() |
boolean |
isFinished() |
Optional<BufferOrEvent> |
pollNext()
Poll the
BufferOrEvent . |
void |
requestPartitions() |
void |
resumeConsumption(InputChannelInfo channelInfo) |
void |
sendTaskEvent(TaskEvent event) |
void |
setChannelStateWriter(ChannelStateWriter channelStateWriter)
Injects the
ChannelStateWriter . |
void |
setup()
Setup gate, potentially heavy-weight, blocking operation comparing to just creation.
|
blockConsumption, checkpointStarted, checkpointStopped, getInputGateIndex
getChannelInfos
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChannelInfos
and, isApproximatelyAvailable, isAvailable, or
public InputGateWithMetrics(IndexedInputGate inputGate, org.apache.flink.metrics.Counter numBytesIn)
public CompletableFuture<?> getAvailableFuture()
getAvailableFuture
在接口中 AvailabilityProvider
getAvailableFuture
在类中 InputGate
AvailabilityProvider.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
在接口中 CheckpointableInput
resumeConsumption
在类中 InputGate
IOException
public int getNumberOfInputChannels()
getNumberOfInputChannels
在接口中 CheckpointableInput
getNumberOfInputChannels
在类中 InputGate
public InputChannel getChannel(int channelIndex)
InputGate
getChannel
在类中 InputGate
public int getGateIndex()
IndexedInputGate
getGateIndex
在类中 IndexedInputGate
public boolean isFinished()
isFinished
在接口中 PullingAsyncDataInput<BufferOrEvent>
isFinished
在类中 InputGate
public void setup() throws IOException
InputGate
setup
在类中 InputGate
IOException
public CompletableFuture<Void> getStateConsumedFuture()
getStateConsumedFuture
在类中 InputGate
public void requestPartitions() throws IOException
requestPartitions
在类中 InputGate
IOException
public void setChannelStateWriter(ChannelStateWriter channelStateWriter)
ChannelStateHolder
ChannelStateWriter
. Must only be called once.setChannelStateWriter
在接口中 ChannelStateHolder
setChannelStateWriter
在类中 InputGate
public Optional<BufferOrEvent> getNext() throws IOException, InterruptedException
InputGate
BufferOrEvent
.
Note: It should be guaranteed that the previous returned buffer has been recycled before getting next one.
getNext
在类中 InputGate
Optional.empty()
if InputGate.isFinished()
returns true.IOException
InterruptedException
public Optional<BufferOrEvent> pollNext() throws IOException, InterruptedException
InputGate
BufferOrEvent
.
Note: It should be guaranteed that the previous returned buffer has been recycled before polling next one.
pollNext
在接口中 PullingAsyncDataInput<BufferOrEvent>
pollNext
在类中 InputGate
Optional.empty()
if there is no data to return or if InputGate.isFinished()
returns true.IOException
InterruptedException
public void sendTaskEvent(TaskEvent event) throws IOException
sendTaskEvent
在类中 InputGate
IOException
public CompletableFuture<?> getPriorityEventAvailableFuture()
InputGate
InputGate.getNext()
.public void finishReadRecoveredState() throws IOException
finishReadRecoveredState
在类中 InputGate
IOException
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.