Class ForwardGroupComputeUtil
- java.lang.Object
-
- org.apache.flink.runtime.jobgraph.forwardgroup.ForwardGroupComputeUtil
-
public class ForwardGroupComputeUtil extends Object
Common utils for computing forward groups.
-
-
Constructor Summary
Constructors Constructor Description ForwardGroupComputeUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancanTargetMergeIntoSourceForwardGroup(ForwardGroup<?> sourceForwardGroup, ForwardGroup<?> forwardGroupToMerge)Determines whether the target forward group can be merged into the source forward group.static Map<JobVertexID,JobVertexForwardGroup>computeForwardGroups(Iterable<JobVertex> topologicallySortedVertices, Function<JobVertex,Set<JobVertex>> forwardProducersRetriever)static Map<JobVertexID,JobVertexForwardGroup>computeForwardGroupsAndCheckParallelism(Iterable<JobVertex> topologicallySortedVertices)static Map<Integer,StreamNodeForwardGroup>computeStreamNodeForwardGroup(Iterable<StreamNode> topologicallySortedStreamNodes, Function<StreamNode,Set<StreamNode>> forwardProducersRetriever)We calculate forward group by a set of stream nodes.
-
-
-
Method Detail
-
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 nodesforwardProducersRetriever- 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.
-
-