Getting app run id for a Spark job

后端 未结 4 1263
忘掉有多难
忘掉有多难 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:33

    With the introduction of the spark: org.apache.spark.sql.SparkSession from Spark 2.0+ on use

    scala> spark.sparkContext.applicationId
    res1: String = app-20170228091742-0025
    

提交回复
热议问题