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 InflightDataRescalingDescriptor |
NO_RESCALE |
| Constructor and Description |
|---|
InflightDataRescalingDescriptor(int[] oldSubtaskIndexes,
RescaleMappings[] rescaledChannelsMappings,
Set<Integer> ambiguousSubtaskIndexes) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
RescaleMappings |
getChannelMapping(int gateOrPartitionIndex) |
int[] |
getOldSubtaskIndexes() |
int |
hashCode() |
boolean |
isAmbiguous(int oldSubtaskIndex) |
String |
toString() |
public static final InflightDataRescalingDescriptor NO_RESCALE
public InflightDataRescalingDescriptor(int[] oldSubtaskIndexes,
RescaleMappings[] rescaledChannelsMappings,
Set<Integer> ambiguousSubtaskIndexes)
public int[] getOldSubtaskIndexes()
public RescaleMappings getChannelMapping(int gateOrPartitionIndex)
public boolean isAmbiguous(int oldSubtaskIndex)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.