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

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

问题描述

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

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

  1. 通过节俭
  2. 通过 SparkInteractor

推荐答案

您可以通过 thrift 在直线中使用带有查询的解释语句,如下所示.

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,那么您需要在数据帧上调用 Explain() 函数.

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天全站免登陆