获取应用程序运行ID为星火工作 [英] Getting app run id for a Spark job

查看:168
本文介绍了获取应用程序运行ID为星火工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想,从那里我运行一个星火的工作,得到那份工作的唯一ID。

I'd like, from where I run a Spark job, to get the unique id of that job.

通过星火主节点的网站,我可以看到ID。它是这样的:

Via the Spark master node website, I can see that id. It's something like:

ID:APP-20140429125304-0452

ID: app-20140429125304-0452

有没有什么办法让这一点,创建一个运行作业时?也许通过SparkContext?

Is there any way to get this, when creating a running a job? Maybe via the SparkContext?

谢谢!

-Greg

推荐答案

是的,正如你所说的:

sc.applicationId
res0: String = app-20150224184813-11531

(这是引发1.2)

(This is spark 1.2)

这篇关于获取应用程序运行ID为星火工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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