Flink JOIN 执行计划
来源:互联网 发布:亿玛创新网络 编辑:程序博客网 时间:2024/05/16 15:41
Flink JOIN 执行计划
代码:
val table1 = env.fromElements((1, "hello")).toTable(tEnv, 'a, 'b) val table2 = env.fromElements((1, "hello")).toTable(tEnv, 'c, 'd) val table = table1.join(table2).where("b = d").select("a, c")
执行计划:
== Abstract Syntax Tree ==LogicalProject(a=[$0], c=[$2]) LogicalFilter(condition=[=($1, $3)]) LogicalJoin(condition=[true], joinType=[inner]) LogicalTableScan(table=[[_DataSetTable_0]]) LogicalTableScan(table=[[_DataSetTable_1]])== Optimized Logical Plan ==DataSetCalc(select=[a, c]) DataSetJoin(where=[=(b, d)], join=[a, b, c, d], joinType=[InnerJoin]) DataSetScan(table=[[_DataSetTable_0]]) DataSetScan(table=[[_DataSetTable_1]])== Physical Execution Plan ==Stage 4 : Data Source content : collect elements with CollectionInputFormat Partitioning : RANDOM_PARTITIONED Stage 3 : Map content : from: (a, b) ship_strategy : Forward exchange_mode : PIPELINED driver_strategy : Map Partitioning : RANDOM_PARTITIONEDStage 6 : Data Source content : collect elements with CollectionInputFormat Partitioning : RANDOM_PARTITIONED Stage 5 : Map content : from: (c, d) ship_strategy : Forward exchange_mode : PIPELINED driver_strategy : Map Partitioning : RANDOM_PARTITIONED Stage 2 : Join content : where: (=(b, d)), join: (a, b, c, d) ship_strategy : Hash Partition on [1] exchange_mode : PIPELINED driver_strategy : Hybrid Hash (build: from: (a, b) (id: 3)) Partitioning : RANDOM_PARTITIONED Stage 1 : FlatMap content : select: (a, c) ship_strategy : Forward exchange_mode : PIPELINED driver_strategy : FlatMap Partitioning : RANDOM_PARTITIONED Stage 0 : Data Sink content : org.apache.flink.api.java.io.DiscardingOutputFormat ship_strategy : Forward exchange_mode : PIPELINED Partitioning : RANDOM_PARTITIONED
Flink优化器的深度优先遍历:
/** * Plan.accept * Traverses the job depth first from all data sinks on towards the sources. * * @see Visitable#accept(Visitor) */ @Override public void accept(Visitor<Operator<?>> visitor) { for (GenericDataSinkBase<?> sink : this.sinks) { sink.accept(visitor); } } /** * GenericDataSinkBase.accept * Accepts the visitor and applies it this instance. This method applies the visitor in a depth-first traversal. * The visitors pre-visit method is called and, if returning * <tt>true</tt>, the visitor is recursively applied on the single input. After the recursion returned, * the post-visit method is called. * * @param visitor The visitor. * * @see org.apache.flink.util.Visitable#accept(org.apache.flink.util.Visitor) */ @Override public void accept(Visitor<Operator<?>> visitor) { boolean descend = visitor.preVisit(this); if (descend) { this.input.accept(visitor); visitor.postVisit(this); } }
阅读全文
0 0
- Flink JOIN 执行计划
- oracle执行计划hash join anti
- PostgreSQL join where 条件不同 explain 执行计划的差别
- SQL中left outer join与inner join 混用时,SQL Server自动优化执行计划
- Oracle执行计划中的连接方式nested loops join、sort merge joinn、hash join
- 【sql调优之执行计划】nested loops join and nested loop join outer
- join执行
- SQL优化--使用 EXISTS 代替 IN 和 inner join来选择正确的执行计划
- sql调优之执行计划之笛卡尔连接————MERGE JOIN CARTESIAN
- Hive0.14在left outer join多级连接中,执行计划生成BUG记录
- 执行计划
- 计划、执行
- 执行计划
- 执行计划
- 计划,,,执行
- 执行计划
- 执行计划
- 执行计划
- 模板方法模式
- http协议基础知识
- (Verilog)单周期CPU设计
- ReorderableList
- To Determine a Prime Number
- Flink JOIN 执行计划
- GO语言最右边斜打印二维数组
- Linux下编译安装boost
- 四、vault
- 自定义View(五)之继承ViewGroup
- 【PostgreSQL-9.6.3】数据表操作语句
- (个人)AR电子书系统创新实训第三周(1)
- JavaWeb三大组件之一Servlet【Servlet接口】
- 五、vault