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 ofStreamTaskInput
that wraps an input from network taken fromCheckpointedInputGate
.This internally uses a
StatusWatermarkValve
to keep track ofWatermark
andWatermarkStatus
events, and forwards them to event subscribers once theStatusWatermarkValve
determines theWatermark
from all inputs has advanced, or that aWatermarkStatus
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.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, watermarkCombiners
-
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)
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
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)
-
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 Detail
-
prepareSnapshot
public CompletableFuture<Void> prepareSnapshot(ChannelStateWriter channelStateWriter, long checkpointId) throws CheckpointException
Description copied from interface:StreamTaskInput
Prepares to spill the in-flight input buffers as checkpoint snapshot.- Throws:
CheckpointException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classAbstractStreamTaskNetworkInput<T,SpillingAdaptiveSpanningRecordDeserializer<DeserializationDelegate<StreamElement>>>
- Throws:
IOException
-
-