1

I have a Spark Session create by spark-shell and another spark session created by my code.(imported via jar passed to the spark-shell)

Is there a way to compare the session id of the two Spark Sessions?

I know we can get applicationId via spark.SparkContext.applicationId.

Are sessionid and applicationId the same? I thought applicationId is associated to a spark job.(A unique identifier for a job)

Is there any way I can get Spark Session id?

blueberret
  • 21
  • 1
  • 5

1 Answers1

0

You can try this. I could not find any way to get sparksession id but you can compare the spark sessions You can refer this

https://www.waitingforcode.com/apache-spark-sql/multiple-sparksession-one-sparkcontext/read

Strick
  • 1,512
  • 9
  • 15