Class ForwardGroupComputeUtil

java.lang.Object
org.apache.flink.runtime.jobgraph.forwardgroup.ForwardGroupComputeUtil

public class ForwardGroupComputeUtil extends Object
Common utils for computing forward groups.
  • Constructor Details

    • ForwardGroupComputeUtil

      public ForwardGroupComputeUtil()
  • Method Details

    • computeForwardGroupsAndCheckParallelism

      public static Map<JobVertexID,JobVertexForwardGroup> computeForwardGroupsAndCheckParallelism(Iterable<JobVertex> topologicallySortedVertices)
    • computeForwardGroups

      public static Map<JobVertexID,JobVertexForwardGroup> computeForwardGroups(Iterable<JobVertex> topologicallySortedVertices, Function<JobVertex,Set<JobVertex>> forwardProducersRetriever)
    • computeStreamNodeForwardGroup

      public static Map<Integer,StreamNodeForwardGroup> computeStreamNodeForwardGroup(Iterable<StreamNode> topologicallySortedStreamNodes, Function<StreamNode,Set<StreamNode>> forwardProducersRetriever)
      We calculate forward group by a set of stream nodes.
      Parameters:
      topologicallySortedStreamNodes - topologically sorted chained stream nodes
      forwardProducersRetriever - records all upstream stream nodes which connected to the given stream node with forward edge
      Returns:
      a map of forward groups, with the stream node id as the key
    • canTargetMergeIntoSourceForwardGroup

      public static boolean canTargetMergeIntoSourceForwardGroup(ForwardGroup<?> sourceForwardGroup, ForwardGroup<?> forwardGroupToMerge)
      Determines whether the target forward group can be merged into the source forward group.
      Parameters:
      sourceForwardGroup - The source forward group.
      forwardGroupToMerge - The forward group needs to be merged.
      Returns:
      whether the merge is valid.