Spark-如何使用-Thirft-Hive Interactor来执行逻辑/物理查询执行 [英] Spark - How can get the Logical / Physical Query execution using - Thirft - Hive Interactor

查看:100
本文介绍了Spark-如何使用-Thirft-Hive Interactor来执行逻辑/物理查询执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Spark-如何使用以下命令获取逻辑/物理查询执行

Spark - How can get the Logical / Physical Query execution using the following

  1. 节俭
  2. 通过SparkInteractor

推荐答案

您可以通过节俭在beeline中将以下解释语句与查询一起使用.

You can use explain statement with query as below in beeline via thrift.

EXPLAIN EXTENDED select * from sr23 join sr12 [<join condidtion>]

成为火花拦截器是什么意思?是spark-sql shell吗?如果是这样,则可以使用上面的查询.

What do you mean be spark interceptor.? is it spark-sql shell.? if it is, then you can use above query.

如果您的意思是spark-shell,则需要在数据帧上调用describe()函数.

If you meant spark-shell, then you need to call explain() function on dataframes.

例如:

val df1 = sqlContext.sql(" < your sql query > ");

df1.explain;

这将给出物理和逻辑计划.您还可以从"SQL"选项卡中的spark Web UI看到它们.

this will give both physical and logical plans. You can also see them from spark web UI in SQL tab.

这篇关于Spark-如何使用-Thirft-Hive Interactor来执行逻辑/物理查询执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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