How to get applicationId of Spark application deployed to YARN in ...


public String applicationId()
A unique identifier for the Spark application. Its format depends on the scheduler implementation. (i.e. in case of local spark app something like 'local-1433865536131' in case of YARN something like 'application_1433865536131_34483' in case of MESOS something like 'driver-20170926223339-0001' )

val appId = spark.sparkContext.applicationId

Posted by '김용환'