星火物理计划和逻辑计划 [英] Spark Physical Plan & Logical Plan

查看:75
本文介绍了星火物理计划和逻辑计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个问题:

  1. 没有添加任何额外的代码来打印提交的Spark作业的逻辑和物理计划,有没有办法查看集群上运行的Spark作业的物理和逻辑计划.

  1. With out adding any extra code to print logical and physical plan for the submitted spark job, Is there a way to see the physical and logical plan of the spark job running on the cluster.

是否可以通过动态方式修改集群中正在运行的spark作业的执行计划,从而获得更好的性能.

Is there way to modify the execution plan dyanamicaly for the running spark job on the cluster for the better performance.

请分享您的想法.

谢谢.

推荐答案

  1. 都是物理的

  1. Both physical

val df: DataFrame  = ???

df.queryExecution.executedPlan

可以使用 queryExecution 属性访问

和逻辑计划.

and logical plan can accessed using queryExecution properties.

df.queryExecution.logical

  • 是的,您可以实现自己的优化器规则.通常,此功能尚未正式记录,但是有一些可用的外部资源:

  • Yes, you can implement your own optimizer rules. This functionality in general not officially documented, but there are some external resources available:

  • 登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆