Class StreamTaskNetworkInput<T>
- java.lang.Object
-
- org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput<T,org.apache.flink.runtime.io.network.api.serialization.SpillingAdaptiveSpanningRecordDeserializer<org.apache.flink.runtime.plugable.DeserializationDelegate<StreamElement>>>
-
- org.apache.flink.streaming.runtime.io.StreamTaskNetworkInput<T>
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.flink.runtime.io.AvailabilityProvider,PushingAsyncDataInput<T>,StreamTaskInput<T>
@Internal public final class StreamTaskNetworkInput<T> extends AbstractStreamTaskNetworkInput<T,org.apache.flink.runtime.io.network.api.serialization.SpillingAdaptiveSpanningRecordDeserializer<org.apache.flink.runtime.plugable.DeserializationDelegate<StreamElement>>>
Implementation ofStreamTaskInputthat wraps an input from network taken fromCheckpointedInputGate.This internally uses a
StatusWatermarkValveto keep track ofWatermarkandWatermarkStatusevents, and forwards them to event subscribers once theStatusWatermarkValvedetermines theWatermarkfrom all inputs has advanced, or that aWatermarkStatusneeds to be propagated downstream to denote a status change.Forwarding elements, watermarks, or status elements must be protected by synchronizing on the given lock object. This ensures that we don't call methods on a
StreamInputProcessorconcurrently with the timer callback or other things.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
org.apache.flink.runtime.io.AvailabilityProvider.AvailabilityHelper
-
Nested classes/interfaces inherited from interface org.apache.flink.streaming.runtime.io.PushingAsyncDataInput
PushingAsyncDataInput.DataOutput<T>
-
-
Field Summary
-
Fields inherited from class org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput
canEmitBatchOfRecords, checkpointedInputGate, deserializationDelegate, flattenedChannelIndices, inputIndex, inputSerializer, recordDeserializers, statusWatermarkValve
-
Fields inherited from interface org.apache.flink.streaming.runtime.io.StreamTaskInput
UNSPECIFIED
-
-
Constructor Summary
Constructors Constructor Description StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()CompletableFuture<Void>prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter, long checkpointId)Prepares to spill the in-flight input buffers as checkpoint snapshot.-
Methods inherited from class org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput
emitNext, getActiveSerializer, getAvailableFuture, getInputIndex, processBuffer, processEvent, releaseDeserializer
-
-
-
-
Constructor Detail
-
StreamTaskNetworkInput
public StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords)
-
-
Method Detail
-
prepareSnapshot
public CompletableFuture<Void> prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter, long checkpointId) throws org.apache.flink.runtime.checkpoint.CheckpointException
Description copied from interface:StreamTaskInputPrepares to spill the in-flight input buffers as checkpoint snapshot.- Throws:
org.apache.flink.runtime.checkpoint.CheckpointException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractStreamTaskNetworkInput<T,org.apache.flink.runtime.io.network.api.serialization.SpillingAdaptiveSpanningRecordDeserializer<org.apache.flink.runtime.plugable.DeserializationDelegate<StreamElement>>>- Throws:
IOException
-
-