Class StreamTaskNetworkInput<T>
java.lang.Object
org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput<T,SpillingAdaptiveSpanningRecordDeserializer<DeserializationDelegate<StreamElement>>>
org.apache.flink.streaming.runtime.io.StreamTaskNetworkInput<T>
- All Implemented Interfaces:
Closeable,AutoCloseable,AvailabilityProvider,PushingAsyncDataInput<T>,StreamTaskInput<T>
@Internal
public final class StreamTaskNetworkInput<T>
extends AbstractStreamTaskNetworkInput<T,SpillingAdaptiveSpanningRecordDeserializer<DeserializationDelegate<StreamElement>>>
Implementation of
StreamTaskInput that wraps an input from network taken from CheckpointedInputGate.
This internally uses a StatusWatermarkValve to keep track of Watermark and
WatermarkStatus events, and forwards them to event subscribers once the StatusWatermarkValve determines the Watermark from all inputs has advanced, or that a
WatermarkStatus needs 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 StreamInputProcessor
concurrently with the timer callback or other things.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
AvailabilityProvider.AvailabilityHelperNested 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, watermarkCombinersFields inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
AVAILABLEFields inherited from interface org.apache.flink.streaming.runtime.io.StreamTaskInput
UNSPECIFIED -
Constructor Summary
ConstructorsConstructorDescriptionStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords) StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords, Set<AbstractInternalWatermarkDeclaration<?>> watermarkDeclarationSet) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()prepareSnapshot(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, releaseDeserializerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
isApproximatelyAvailable, isAvailable
-
Constructor Details
-
StreamTaskNetworkInput
public StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords) -
StreamTaskNetworkInput
public StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords, Set<AbstractInternalWatermarkDeclaration<?>> watermarkDeclarationSet)
-
-
Method Details
-
prepareSnapshot
public CompletableFuture<Void> prepareSnapshot(ChannelStateWriter channelStateWriter, long checkpointId) throws CheckpointException Description copied from interface:StreamTaskInputPrepares to spill the in-flight input buffers as checkpoint snapshot.- Throws:
CheckpointException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractStreamTaskNetworkInput<T,SpillingAdaptiveSpanningRecordDeserializer<DeserializationDelegate<StreamElement>>> - Throws:
IOException
-