Reputation: 137
I'm working on logging the details of the spark job executions. I would like to get the username of the user who submitted the spark job, from within the context of the spark job.
Any help is appreciated. Thanks..
Upvotes: 3
Views: 3502
Reputation: 31480
Try the below command to get the spark user
who submitted the job.
Spark >= 2.0
spark.sparkContext.sparkUser
(or)
spark < 2.0
sc.sparkUser
Upvotes: 2