public class InflightDataRescalingDescriptor extends Object implements Serializable
For inputs, this mapping implies the following:
oldSubtaskIndexes
is set when there is a rescale on this task potentially leading
to different key groups. Upstream task has a corresponding rescaledChannelsMappings
where it sends data over virtual channel while specifying the
channel index in the VirtualChannelSelector. This subtask then demultiplexes over the
virtual subtask index.
rescaledChannelsMappings
is set when there is a downscale of the upstream task.
Upstream task has a corresponding oldSubtaskIndexes
where it sends data over virtual
channel while specifying the subtask index in the VirtualChannelSelector. This subtask then
demultiplexes over channel indexes.
For outputs, it's vice-versa. The information must be kept in sync but they are used in opposite ways for multiplexing/demultiplexing.
Note that in the common rescaling case both information is set and need to be simultaneously used. If the input subtask subsumes the state of 3 old subtasks and a channel corresponds to 2 old channels, then there are 6 virtual channels to be demultiplexed.
Modifier and Type | Field and Description |
---|---|
static Map<Integer,RescaledChannelsMapping> |
NO_MAPPINGS |
static InflightDataRescalingDescriptor |
NO_RESCALE |
static Set<Integer> |
NO_SUBTASKS |
Constructor and Description |
---|
InflightDataRescalingDescriptor(Set<Integer> oldSubtaskIndexes,
Map<Integer,RescaledChannelsMapping> rescaledChannelsMappings) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
RescaledChannelsMapping |
getChannelMapping(int gateOrPartitionIndex) |
int[] |
getOldSubtaskIndexes(int defaultSubtask) |
int |
hashCode() |
public static final Map<Integer,RescaledChannelsMapping> NO_MAPPINGS
public static final InflightDataRescalingDescriptor NO_RESCALE
public InflightDataRescalingDescriptor(Set<Integer> oldSubtaskIndexes, Map<Integer,RescaledChannelsMapping> rescaledChannelsMappings)
public int[] getOldSubtaskIndexes(int defaultSubtask)
public RescaledChannelsMapping getChannelMapping(int gateOrPartitionIndex)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.