0

How can I change the user of the context created in Spark Job Server? I want to change the user which I am getting on sparkSession.sparkContext.sparkUser();

mck
  • 40,932
  • 13
  • 35
  • 50

1 Answers1

0

follow the below steps.

[root@localhost bin]# export HADOOP_USER_NAME=praveen //set this environment variable
[root@localhost bin]# ./spark-shell // start the spark shell

scala> sc.sparkUser //Spark context available as sc.
res0: String = praveen

By this way you can change the sparkUser value.

jose praveen
  • 1,298
  • 2
  • 10
  • 17