public class JobGraphGenerator extends Object implements org.apache.flink.util.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(org.apache.flink.configuration.Configuration config) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.runtime.jobgraph.JobGraph |
compileJobGraph(OptimizedPlan program)
Translates a
OptimizedPlan into a
JobGraph. |
org.apache.flink.runtime.jobgraph.JobGraph |
compileJobGraph(OptimizedPlan program,
org.apache.flink.api.common.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(org.apache.flink.configuration.Configuration config)
public org.apache.flink.runtime.jobgraph.JobGraph compileJobGraph(OptimizedPlan program)
OptimizedPlan into a
JobGraph.program - Optimized plan that is translated into a JobGraph.public org.apache.flink.runtime.jobgraph.JobGraph compileJobGraph(OptimizedPlan program, org.apache.flink.api.common.JobID jobId)
public boolean preVisit(PlanNode node)
preVisit in interface org.apache.flink.util.Visitor<PlanNode>node - The node that is currently processed.Visitor.preVisit(org.apache.flink.util.Visitable)public void postVisit(PlanNode node)
postVisit in interface org.apache.flink.util.Visitor<PlanNode>node - The node currently processed during the post-visit.tCopyright © 2014–2017 The Apache Software Foundation. All rights reserved.