Class RescaleMappings

java.lang.Object
org.apache.flink.runtime.checkpoint.RescaleMappings
All Implemented Interfaces:
Serializable

public class RescaleMappings extends Object implements Serializable
Contains the fine-grain channel mappings that occur when a connected operator has been rescaled.

Usually the mapping is materialized from new->old channel/subtask indexes. Through invert(), the direction may change accordingly. To generalize, the left side is called source and the right side is called target(s) in this class.

See Also:
  • Field Details

    • SYMMETRIC_IDENTITY

      public static final RescaleMappings SYMMETRIC_IDENTITY
  • Method Details

    • identity

      public static RescaleMappings identity(int numberOfSources, int numberOfTargets)
    • isIdentity

      public boolean isIdentity()
    • getMappedIndexes

      public int[] getMappedIndexes(int sourceIndex)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • invert

      public RescaleMappings invert()
    • getAmbiguousTargets

      public Set<Integer> getAmbiguousTargets()
    • of

      public static RescaleMappings of(Stream<int[]> mappedTargets, int numberOfTargets)