@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>checkpointedInputGate, deserializationDelegate, flattenedChannelIndices, inputIndex, inputSerializer, recordDeserializers, statusWatermarkValveUNSPECIFIED| Constructor and Description |
|---|
RescalingStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate,
org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer,
org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager,
StatusWatermarkValve statusWatermarkValve,
int inputIndex,
org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptor inflightDataRescalingDescriptor,
java.util.function.Function<Integer,StreamPartitioner<?>> gatePartitioners,
org.apache.flink.api.common.TaskInfo taskInfo) |
| Modifier and Type | Method and Description |
|---|---|
StreamTaskInput<T> |
finishRecovery() |
protected org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T> |
getActiveSerializer(org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo) |
CompletableFuture<Void> |
prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter,
long checkpointId)
Prepares to spill the in-flight input buffers as checkpoint snapshot.
|
protected org.apache.flink.core.io.InputStatus |
processEvent(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent bufferOrEvent) |
close, emitNext, getAvailableFuture, getInputIndex, processBuffer, releaseDeserializerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInputIndexemitNextpublic RescalingStreamTaskNetworkInput(CheckpointedInputGate checkpointedInputGate, org.apache.flink.api.common.typeutils.TypeSerializer<T> inputSerializer, org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager, StatusWatermarkValve statusWatermarkValve, int inputIndex, org.apache.flink.runtime.checkpoint.InflightDataRescalingDescriptor inflightDataRescalingDescriptor, java.util.function.Function<Integer,StreamPartitioner<?>> gatePartitioners, org.apache.flink.api.common.TaskInfo taskInfo)
public StreamTaskInput<T> finishRecovery() throws IOException
finishRecovery in interface RecoverableStreamTaskInput<T>IOExceptionprotected org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T> getActiveSerializer(org.apache.flink.runtime.checkpoint.channel.InputChannelInfo channelInfo)
getActiveSerializer in class AbstractStreamTaskNetworkInput<T,org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T>>protected org.apache.flink.core.io.InputStatus processEvent(org.apache.flink.runtime.io.network.partition.consumer.BufferOrEvent bufferOrEvent)
processEvent in class AbstractStreamTaskNetworkInput<T,org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T>>public CompletableFuture<Void> prepareSnapshot(org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter channelStateWriter, long checkpointId) throws org.apache.flink.runtime.checkpoint.CheckpointException
StreamTaskInputprepareSnapshot in interface StreamTaskInput<T>org.apache.flink.runtime.checkpoint.CheckpointExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.