Class JobGraphGenerator
- java.lang.Object
-
- org.apache.flink.optimizer.plantranslate.JobGraphGenerator
-
- All Implemented Interfaces:
org.apache.flink.util.Visitor<PlanNode>
public class JobGraphGenerator extends Object implements org.apache.flink.util.Visitor<PlanNode>
This component translates the optimizer's resultingOptimizedPlanto aJobGraph. The translation is not strictly a one-to-one, because some nodes from the OptimizedPlan are collapsed into one job vertex.This translation does not make any decisions or assumptions. All degrees-of-freedom in the execution of the job are made by the Optimizer, so that this translation becomes a deterministic mapping.
The basic method of operation is a top down traversal over the plan graph. On the way down, job vertices are created for the plan nodes, on the way back up, the nodes connect their predecessors.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMERGE_ITERATION_AUX_TASKS_KEY
-
Constructor Summary
Constructors Constructor Description JobGraphGenerator()Creates a new job graph generator that uses the default values for its resource configuration.JobGraphGenerator(org.apache.flink.configuration.Configuration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.runtime.jobgraph.JobGraphcompileJobGraph(OptimizedPlan program)Translates aOptimizedPlaninto aJobGraph.org.apache.flink.runtime.jobgraph.JobGraphcompileJobGraph(OptimizedPlan program, org.apache.flink.api.common.JobID jobId)voidpostVisit(PlanNode node)This method implements the post-visit during the depth-first traversal.booleanpreVisit(PlanNode node)This methods implements the pre-visiting during a depth-first traversal.
-
-
-
Field Detail
-
MERGE_ITERATION_AUX_TASKS_KEY
public static final String MERGE_ITERATION_AUX_TASKS_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
compileJobGraph
public org.apache.flink.runtime.jobgraph.JobGraph compileJobGraph(OptimizedPlan program)
Translates aOptimizedPlaninto aJobGraph.- Parameters:
program- Optimized plan that is translated into a JobGraph.- Returns:
- JobGraph generated from the plan.
-
compileJobGraph
public org.apache.flink.runtime.jobgraph.JobGraph compileJobGraph(OptimizedPlan program, org.apache.flink.api.common.JobID jobId)
-
preVisit
public boolean preVisit(PlanNode node)
This methods implements the pre-visiting during a depth-first traversal. It create the job vertex and sets local strategy.- Specified by:
preVisitin interfaceorg.apache.flink.util.Visitor<PlanNode>- Parameters:
node- The node that is currently processed.- Returns:
- True, if the visitor should descend to the node's children, false if not.
- See Also:
Visitor.preVisit(org.apache.flink.util.Visitable)
-
postVisit
public void postVisit(PlanNode node)
This method implements the post-visit during the depth-first traversal. When the post visit happens, all of the descendants have been processed, so this method connects all of the current node's predecessors to the current node.- Specified by:
postVisitin interfaceorg.apache.flink.util.Visitor<PlanNode>- Parameters:
node- The node currently processed during the post-visit.- See Also:
t
-
-