public class InputGateWithMetrics extends InputGate
InputGate
provided by shuffle service and it is mainly
used for increasing general input metrics from TaskIOMetricGroup
.InputGate.InputWithData<INPUT,DATA>
AvailabilityProvider.AvailabilityHelper
availabilityHelper
AVAILABLE
构造器和说明 |
---|
InputGateWithMetrics(InputGate inputGate,
org.apache.flink.metrics.Counter numBytesIn) |
限定符和类型 | 方法和说明 |
---|---|
void |
close() |
CompletableFuture<?> |
getAvailableFuture() |
Optional<BufferOrEvent> |
getNext()
Blocking call waiting for next
BufferOrEvent . |
int |
getNumberOfInputChannels() |
boolean |
isFinished() |
Optional<BufferOrEvent> |
pollNext()
Poll the
BufferOrEvent . |
void |
sendTaskEvent(TaskEvent event) |
void |
setup()
Setup gate, potentially heavy-weight, blocking operation comparing to just creation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isApproximatelyAvailable, isAvailable
public InputGateWithMetrics(InputGate 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 int getNumberOfInputChannels()
getNumberOfInputChannels
在类中 InputGate
public boolean isFinished()
isFinished
在接口中 PullingAsyncDataInput<BufferOrEvent>
isFinished
在类中 InputGate
public void setup() throws IOException, InterruptedException
InputGate
setup
在类中 InputGate
IOException
InterruptedException
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
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.