Getting app run id for a Spark job

后端 未结 4 1264
忘掉有多难
忘掉有多难 2020-12-03 21:05

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

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



        
4条回答
  •  渐次进展
    2020-12-03 21:45

    yes, exactly as you said:

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

    (This is spark 1.2)

    See API doc at

    • https://spark.apache.org/docs/1.6.1/api/scala/index.html#org.apache.spark.SparkContext

提交回复
热议问题