如何测量星火查询的执行时间 [英] How to measure the execution time of a query on Spark
本文介绍了如何测量星火查询的执行时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要衡量在Apache火花(Bluemix)查询的执行时间。
我试了一下:
I need to measure the execution time of query on Apache spark (Bluemix). What I tried:
import time
startTimeQuery = time.clock()
df = sqlContext.sql(query)
df.show()
endTimeQuery = time.clock()
runTimeQuery = endTimeQuery - startTimeQuery
这是个好办法吗?我得到的时间看起来相对,当我看到桌子太小。
Is it a good way? The time that I get looks too small relative to when I see the table.
推荐答案
在Bluemix,在笔记本进入Paelette右侧。选择环境现状面板,你会看到一个链接到星火历史服务器,在那里你可以调查星火执行工作,包括计算时间。
On Bluemix, in your notebooks go to the "Paelette" on the right side. Choose the "Evironment" Panel and you will see a link to the Spark History Server, where you can investigate the performed Spark jobs including computation times.
这篇关于如何测量星火查询的执行时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文