Package org.apache.flink.optimizer.plan
Class OptimizedPlan
- java.lang.Object
-
- org.apache.flink.optimizer.plan.OptimizedPlan
-
- All Implemented Interfaces:
org.apache.flink.util.Visitable<PlanNode>
public class OptimizedPlan extends Object implements org.apache.flink.util.Visitable<PlanNode>
The execution plan generated by the Optimizer. It containsPlanNodes andChannels 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 Summary
Constructors Constructor Description OptimizedPlan(Collection<SourcePlanNode> sources, Collection<SinkPlanNode> sinks, Collection<PlanNode> allNodes, String jobName, org.apache.flink.api.common.Plan programPlan)Creates a new instance of this optimizer plan container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(org.apache.flink.util.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.StringgetJobName()Returns the name of the program.org.apache.flink.api.common.PlangetOriginalPlan()Gets the original program's dataflow plan from which this optimized plan was created.
-
-
-
Constructor Detail
-
OptimizedPlan
public OptimizedPlan(Collection<SourcePlanNode> sources, Collection<SinkPlanNode> sinks, Collection<PlanNode> allNodes, String jobName, org.apache.flink.api.common.Plan programPlan)
Creates a new instance of this optimizer plan container. The plan is given and fully described by the data sources, sinks and the collection of all nodes.- Parameters:
sources- The data sources.sinks- The data sinks.allNodes- A collection containing all nodes in the plan.jobName- The name of the program
-
-
Method Detail
-
getDataSources
public Collection<SourcePlanNode> getDataSources()
Gets the data sources from this OptimizedPlan.- Returns:
- The data sources.
-
getDataSinks
public Collection<SinkPlanNode> getDataSinks()
Gets the data sinks from this OptimizedPlan.- Returns:
- The data sinks.
-
getAllNodes
public Collection<PlanNode> getAllNodes()
Gets all the nodes from this OptimizedPlan.- Returns:
- All nodes.
-
getJobName
public String getJobName()
Returns the name of the program.- Returns:
- The name of the program.
-
getOriginalPlan
public org.apache.flink.api.common.Plan getOriginalPlan()
Gets the original program's dataflow plan from which this optimized plan was created.- Returns:
- The original program's dataflow plan.
-
accept
public void accept(org.apache.flink.util.Visitor<PlanNode> visitor)
Applies the given visitor top down to all nodes, starting at the sinks.- Specified by:
acceptin interfaceorg.apache.flink.util.Visitable<PlanNode>- Parameters:
visitor- The visitor to apply to the nodes in this plan.- See Also:
Visitable.accept(org.apache.flink.util.Visitor)
-
-