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 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
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.runtime.io.AvailabilityProvider
AVAILABLE
-
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, 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(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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
isApproximatelyAvailable, isAvailable
-
-
-
-
Constructor Detail
-
StreamTaskNetworkInput
public StreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords)
-
-
Method Detail
-
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
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractStreamTaskNetworkInput<T,SpillingAdaptiveSpanningRecordDeserializer<DeserializationDelegate<StreamElement>>>- Throws:
IOException
-
-