Search code examples
apache-sparkhadoopapache-zeppelin

How can I tell which application I'm running in Spark?


I use Zeppelin to run Spark queries and we have the Spark application UI.

enter image description here

But, we only have one of the UI views for each of the running applications.

https://spark-history-server.[myURL].com/history/application_112378123821_98123

I have Zeppelin running on Hadoop. I'd like to find out what my application ID should be.

Is there a way that I can find this out from within a Zeppelin notebook?


Solution

  • Use sc.applicationId to get the application id for the current job.

    Using Spark Session:

    spark.sparkContext.applicationId