@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| 构造器和说明 |
|---|
StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate,
org.apache.flink.api.common.typeutils.TypeSerializer<?> inputSerializer,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
StatusWatermarkValve statusWatermarkValve,
int inputIndex) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
org.apache.flink.core.io.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.
|
CompletableFuture<Void> |
prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter,
long checkpointId)
Prepares to spill the in-flight input buffers as checkpoint snapshot.
|
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 org.apache.flink.core.io.InputStatus emitNext(PushingAsyncDataInput.DataOutput<T> output) throws Exception
PushingAsyncDataInputThis method should be non blocking.
emitNext 在接口中 PushingAsyncDataInput<T>Exceptionpublic int getInputIndex()
StreamTaskInputgetInputIndex 在接口中 StreamTaskInput<T>public CompletableFuture<?> getAvailableFuture()
getAvailableFuture 在接口中 org.apache.flink.runtime.io.AvailabilityProviderpublic CompletableFuture<Void> prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter, long checkpointId) throws IOException
StreamTaskInputprepareSnapshot 在接口中 StreamTaskInput<T>IOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.