@Internal public final class StreamTaskNetworkInput<T> extends Object implements StreamTaskInput<T>
StreamTaskInput that wraps an input from network taken from CheckpointedInputGate.
This internally uses a StatusWatermarkValve to keep track of Watermark and
StreamStatus events, and forwards them to event subscribers once the
StatusWatermarkValve determines the Watermark from all inputs has advanced, or
that a StreamStatus needs to be propagated downstream to denote a status change.
Forwarding elements, watermarks, or status status elements must be protected by synchronizing
on the given lock object. This ensures that we don't call methods on a
StreamInputProcessor concurrently with the timer callback or other things.
PushingAsyncDataInput.DataOutput<T>UNSPECIFIED| Constructor and Description |
|---|
StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate,
org.apache.flink.api.common.typeutils.TypeSerializer<?> inputSerializer,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
StatusWatermarkValve statusWatermarkValve,
int inputIndex) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
InputStatus |
emitNext(PushingAsyncDataInput.DataOutput<T> output)
Pushes the next element to the output from current data input, and returns
the input status to indicate whether there are more available data in
current input.
|
CompletableFuture<?> |
getAvailableFuture() |
int |
getInputIndex()
Returns the input index of this input.
|
public StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<?> inputSerializer, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex)
public InputStatus emitNext(PushingAsyncDataInput.DataOutput<T> output) throws Exception
PushingAsyncDataInputThis method should be non blocking.
emitNext in interface PushingAsyncDataInput<T>Exceptionpublic int getInputIndex()
StreamTaskInputgetInputIndex in interface StreamTaskInput<T>public CompletableFuture<?> getAvailableFuture()
getAvailableFuture in interface org.apache.flink.runtime.io.AvailabilityProviderpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.