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 designatedRecordDeserializerfor spanning records. Specific implementation bind it to a specificRecordDeserializer.
-
-
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 Modifier and Type Field Description protected StreamTask.CanEmitBatchOfRecordsCheckercanEmitBatchOfRecordsprotected CheckpointedInputGatecheckpointedInputGateprotected DeserializationDelegate<StreamElement>deserializationDelegateprotected Map<InputChannelInfo,Integer>flattenedChannelIndicesprotected intinputIndexprotected org.apache.flink.api.common.typeutils.TypeSerializer<T>inputSerializerprotected Map<InputChannelInfo,R>recordDeserializersprotected StatusWatermarkValvestatusWatermarkValveValve that controls how watermarks and watermark statuses are forwarded.protected Map<String,WatermarkCombiner>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 AbstractStreamTaskNetworkInput(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()DataInputStatusemitNext(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)CompletableFuture<?>getAvailableFuture()intgetInputIndex()Returns 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, wait
-
Methods inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
isApproximatelyAvailable, isAvailable
-
Methods inherited from interface org.apache.flink.streaming.runtime.io.StreamTaskInput
prepareSnapshot
-
-
-
-
Field Detail
-
checkpointedInputGate
protected final CheckpointedInputGate checkpointedInputGate
-
deserializationDelegate
protected final DeserializationDelegate<StreamElement> deserializationDelegate
-
inputSerializer
protected final org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer
-
recordDeserializers
protected final Map<InputChannelInfo,R extends RecordDeserializer<DeserializationDelegate<StreamElement>>> recordDeserializers
-
flattenedChannelIndices
protected final Map<InputChannelInfo,Integer> flattenedChannelIndices
-
statusWatermarkValve
protected final StatusWatermarkValve statusWatermarkValve
Valve that controls how watermarks and watermark statuses are forwarded.
-
inputIndex
protected final int inputIndex
-
watermarkCombiners
protected final Map<String,WatermarkCombiner> watermarkCombiners
-
canEmitBatchOfRecords
protected final StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords
-
-
Constructor Detail
-
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 Detail
-
emitNext
public DataInputStatus emitNext(PushingAsyncDataInput.DataOutput<T> output) throws Exception
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
protected void processBuffer(BufferOrEvent bufferOrEvent) throws IOException
- Throws:
IOException
-
getActiveSerializer
protected R getActiveSerializer(InputChannelInfo channelInfo)
-
getInputIndex
public int getInputIndex()
Description copied from interface:StreamTaskInputReturns the input index of this input.- Specified by:
getInputIndexin interfaceStreamTaskInput<T>
-
getAvailableFuture
public CompletableFuture<?> getAvailableFuture()
- Specified by:
getAvailableFuturein interfaceAvailabilityProvider- Returns:
- a future that is completed if the respective provider is available.
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
releaseDeserializer
protected void releaseDeserializer(InputChannelInfo channelInfo)
-
-