public class OptimizedPlan extends Object implements Visitable<PlanNode>
PlanNode
s and Channel
s
that describe exactly how the program should be executed.
The optimized plan defines all ship strategies (local pipe, shuffle, broadcast, rebalance), all operator strategies (sorting-merge join, hash join, sorted grouping, ...), and the data exchange modes (batched, pipelined).
Constructor and Description |
---|
OptimizedPlan(Collection<SourcePlanNode> sources,
Collection<SinkPlanNode> sinks,
Collection<PlanNode> allNodes,
String jobName,
Plan programPlan)
Creates a new instance of this optimizer plan container.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor<PlanNode> visitor)
Applies the given visitor top down to all nodes, starting at the sinks.
|
Collection<PlanNode> |
getAllNodes()
Gets all the nodes from this OptimizedPlan.
|
Collection<SinkPlanNode> |
getDataSinks()
Gets the data sinks from this OptimizedPlan.
|
Collection<SourcePlanNode> |
getDataSources()
Gets the data sources from this OptimizedPlan.
|
String |
getJobName()
Returns the name of the program.
|
Plan |
getOriginalPlan()
Gets the original program's dataflow plan from which this optimized plan was created.
|
public OptimizedPlan(Collection<SourcePlanNode> sources, Collection<SinkPlanNode> sinks, Collection<PlanNode> allNodes, String jobName, Plan programPlan)
sources
- The data sources.sinks
- The data sinks.allNodes
- A collection containing all nodes in the plan.jobName
- The name of the programpublic Collection<SourcePlanNode> getDataSources()
public Collection<SinkPlanNode> getDataSinks()
public Collection<PlanNode> getAllNodes()
public String getJobName()
public Plan getOriginalPlan()
public void accept(Visitor<PlanNode> visitor)
accept
in interface Visitable<PlanNode>
visitor
- The visitor to apply to the nodes in this plan.Visitable.accept(org.apache.flink.util.Visitor)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.