Class AbstractStreamTaskNetworkInput<T,R extends RecordDeserializer<DeserializationDelegate<StreamElement>>>
java.lang.Object
org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput<T,R>
- All Implemented Interfaces:
Closeable,AutoCloseable,AvailabilityProvider,PushingAsyncDataInput<T>,StreamTaskInput<T>
- Direct Known Subclasses:
RescalingStreamTaskNetworkInput,StreamTaskNetworkInput
public abstract class AbstractStreamTaskNetworkInput<T,R extends RecordDeserializer<DeserializationDelegate<StreamElement>>>
extends Object
implements StreamTaskInput<T>
Base class for network-based StreamTaskInput where each channel has a designated
RecordDeserializer for spanning records. Specific implementation bind it to a specific RecordDeserializer.-
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
FieldsModifier and TypeFieldDescriptionprotected final StreamTask.CanEmitBatchOfRecordsCheckerprotected final CheckpointedInputGateprotected final DeserializationDelegate<StreamElement>protected final Map<InputChannelInfo,Integer> protected final intprotected final org.apache.flink.api.common.typeutils.TypeSerializer<T>protected final Map<InputChannelInfo,R> protected final StatusWatermarkValveValve that controls how watermarks and watermark statuses are forwarded.protected final Map<String,WatermarkCombiner> Fields inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
AVAILABLEFields inherited from interface org.apache.flink.streaming.runtime.io.StreamTaskInput
UNSPECIFIED -
Constructor Summary
ConstructorsConstructorDescriptionAbstractStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, StatusWatermarkValve statusWatermarkValve, int inputIndex, Map<InputChannelInfo, R> recordDeserializers, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords) AbstractStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, StatusWatermarkValve statusWatermarkValve, int inputIndex, Map<InputChannelInfo, R> recordDeserializers, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords, Set<AbstractInternalWatermarkDeclaration<?>> watermarkDeclarationSet) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()emitNext(PushingAsyncDataInput.DataOutput<T> output) Pushes elements to the output from current data input, and returns the input status to indicate whether there are more available data in current input.protected RgetActiveSerializer(InputChannelInfo channelInfo) intReturns the input index of this input.protected voidprocessBuffer(BufferOrEvent bufferOrEvent) protected DataInputStatusprocessEvent(BufferOrEvent bufferOrEvent, PushingAsyncDataInput.DataOutput<T> output) protected voidreleaseDeserializer(InputChannelInfo channelInfo) Methods 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, isAvailableMethods inherited from interface org.apache.flink.streaming.runtime.io.StreamTaskInput
prepareSnapshot
-
Field Details
-
checkpointedInputGate
-
deserializationDelegate
-
inputSerializer
-
recordDeserializers
protected final Map<InputChannelInfo,R extends RecordDeserializer<DeserializationDelegate<StreamElement>>> recordDeserializers -
flattenedChannelIndices
-
statusWatermarkValve
Valve that controls how watermarks and watermark statuses are forwarded. -
inputIndex
protected final int inputIndex -
watermarkCombiners
-
canEmitBatchOfRecords
-
-
Constructor Details
-
AbstractStreamTaskNetworkInput
public AbstractStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, StatusWatermarkValve statusWatermarkValve, int inputIndex, Map<InputChannelInfo, R> recordDeserializers, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords) -
AbstractStreamTaskNetworkInput
public AbstractStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, StatusWatermarkValve statusWatermarkValve, int inputIndex, Map<InputChannelInfo, R> recordDeserializers, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords, Set<AbstractInternalWatermarkDeclaration<?>> watermarkDeclarationSet)
-
-
Method Details
-
emitNext
Description copied from interface:PushingAsyncDataInputPushes elements to the output from current data input, and returns the input status to indicate whether there are more available data in current input.This method should be non blocking.
- Specified by:
emitNextin interfacePushingAsyncDataInput<T>- Throws:
Exception
-
processEvent
protected DataInputStatus processEvent(BufferOrEvent bufferOrEvent, PushingAsyncDataInput.DataOutput<T> output) -
processBuffer
- Throws:
IOException
-
getActiveSerializer
-
getInputIndex
public int getInputIndex()Description copied from interface:StreamTaskInputReturns the input index of this input.- Specified by:
getInputIndexin interfaceStreamTaskInput<T>
-
getAvailableFuture
- Specified by:
getAvailableFuturein interfaceAvailabilityProvider- Returns:
- a future that is completed if the respective provider is available.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
releaseDeserializer
-