@Internal public final class RescalingStreamTaskNetworkInput<T> extends AbstractStreamTaskNetworkInput<T,org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T>> implements RecoverableStreamTaskInput<T>
StreamTaskNetworkInput
implementation that demultiplexes virtual channels.
The demultiplexing works in two dimensions for the following cases. *
In both cases, records from multiple old channels are received over one new physical channel, which need to demultiplex the record to correctly restore spanning records (similar to how StreamTaskNetworkInput works).
Note that when both cases occur at the same time (downscaling of several operators), there is the cross product of channels. So if two subtasks are collapsed and two channels overlap from the output side, there is a total of 4 virtual channels.
PushingAsyncDataInput.DataOutput<T>
AvailabilityProvider.AvailabilityHelper
canEmitBatchOfRecords, checkpointedInputGate, deserializationDelegate, flattenedChannelIndices, inputIndex, inputSerializer, recordDeserializers, statusWatermarkValve
UNSPECIFIED
AVAILABLE
Constructor and Description |
---|
RescalingStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate,
TypeSerializer<T> inputSerializer,
IOManager ioManager,
StatusWatermarkValve statusWatermarkValve,
int inputIndex,
InflightDataRescalingDescriptor inflightDataRescalingDescriptor,
java.util.function.Function<Integer,StreamPartitioner<?>> gatePartitioners,
TaskInfo taskInfo,
StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords) |
Modifier and Type | Method and Description |
---|---|
StreamTaskInput<T> |
finishRecovery() |
protected org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T> |
getActiveSerializer(InputChannelInfo channelInfo) |
CompletableFuture<Void> |
prepareSnapshot(ChannelStateWriter channelStateWriter,
long checkpointId)
Prepares to spill the in-flight input buffers as checkpoint snapshot.
|
protected DataInputStatus |
processEvent(BufferOrEvent bufferOrEvent) |
close, emitNext, getAvailableFuture, getInputIndex, processBuffer, releaseDeserializer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputIndex
emitNext
and, getAvailableFuture, isApproximatelyAvailable, isAvailable, or
public RescalingStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, TypeSerializer<T> inputSerializer, IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, InflightDataRescalingDescriptor inflightDataRescalingDescriptor, java.util.function.Function<Integer,StreamPartitioner<?>> gatePartitioners, TaskInfo taskInfo, StreamTask.CanEmitBatchOfRecordsChecker canEmitBatchOfRecords)
public StreamTaskInput<T> finishRecovery() throws IOException
finishRecovery
in interface RecoverableStreamTaskInput<T>
IOException
protected org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T> getActiveSerializer(InputChannelInfo channelInfo)
getActiveSerializer
in class AbstractStreamTaskNetworkInput<T,org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T>>
protected DataInputStatus processEvent(BufferOrEvent bufferOrEvent)
processEvent
in class AbstractStreamTaskNetworkInput<T,org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T>>
public CompletableFuture<Void> prepareSnapshot(ChannelStateWriter channelStateWriter, long checkpointId) throws CheckpointException
StreamTaskInput
prepareSnapshot
in interface StreamTaskInput<T>
CheckpointException
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.