Class RescalingStreamTaskNetworkInput<T>

java.lang.Object
org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput<T,org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T>>
org.apache.flink.streaming.runtime.io.recovery.RescalingStreamTaskNetworkInput<T>
All Implemented Interfaces:
Closeable, AutoCloseable, AvailabilityProvider, PushingAsyncDataInput<T>, RecoverableStreamTaskInput<T>, StreamTaskInput<T>

@Internal public final class RescalingStreamTaskNetworkInput<T> extends AbstractStreamTaskNetworkInput<T,org.apache.flink.streaming.runtime.io.recovery.DemultiplexingRecordDeserializer<T>> implements RecoverableStreamTaskInput<T>
A StreamTaskNetworkInput implementation that demultiplexes virtual channels.

The demultiplexing works in two dimensions for the following cases. *

  • Subtasks of the current operator have been collapsed in a round-robin fashion.
  • The connected output operator has been rescaled (up and down!) and there is an overlap of channels (mostly relevant to keyed exchanges).

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.