我安装了本地 hadoop 单节点和 hive,并且在 hdfs 中存储了一些 hive 表。然后我使用 MySQL Metastore 配置 Hive。现在我安装了 Spark,并且对 Hive 表进行了一些查询,如下所示(在 scala 中):
var hiveContext = new org.apache.spark.sql.hive.HiveContext(sc)
result = hiveContext.sql("SELECT * FROM USERS");
result.show
你知道如何配置spark来显示查询的执行时间吗?因为默认情况下它不显示..
Use spark.time()
.
var hiveContext = new org.apache.spark.sql.hive.HiveContext(sc)
result = hiveContext.sql("SELECT * FROM USERS");
spark.time(result.show)
https://db-blog.web.cern.ch/blog/luca-canali/2017-03-measuring-apache-spark-workload-metrics-performance-troubleshooting https://db-blog.web.cern.ch/blog/luca-canali/2017-03-measuring-apache-spark-workload-metrics-performance-troubleshooting
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)