public class JobGraphGenerator extends Object implements Visitor<PlanNode>
OptimizedPlan
to a JobGraph
. 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.
Modifier and Type | Field and Description |
---|---|
static String |
MERGE_ITERATION_AUX_TASKS_KEY |
Constructor and Description |
---|
JobGraphGenerator()
Creates a new job graph generator that uses the default values for its resource
configuration.
|
JobGraphGenerator(Configuration config) |
Modifier and Type | Method and Description |
---|---|
JobGraph |
compileJobGraph(OptimizedPlan program)
Translates a
OptimizedPlan into a JobGraph . |
JobGraph |
compileJobGraph(OptimizedPlan program,
JobID jobId) |
void |
postVisit(PlanNode node)
This method implements the post-visit during the depth-first traversal.
|
boolean |
preVisit(PlanNode node)
This methods implements the pre-visiting during a depth-first traversal.
|
public static final String MERGE_ITERATION_AUX_TASKS_KEY
public JobGraphGenerator()
public JobGraphGenerator(Configuration config)
public JobGraph compileJobGraph(OptimizedPlan program)
OptimizedPlan
into a JobGraph
.program
- Optimized plan that is translated into a JobGraph.public JobGraph compileJobGraph(OptimizedPlan program, JobID jobId)
public boolean preVisit(PlanNode node)
preVisit
in interface Visitor<PlanNode>
node
- The node that is currently processed.Visitor.preVisit(org.apache.flink.util.Visitable)
public void postVisit(PlanNode node)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.