Hi,

is there a way to impersonate multiple users using the same SparkContext
(e.g. like this
https://hadoop.apache.org/docs/r2.7.2/hadoop-project-dist/hadoop-common/Superusers.html)
when going through the Spark API?

What I'd like to do is that
1) submit a long running Spark yarn-client application using a Hadoop
superuser (e.g. "super")
2) impersonate different users with "super" when reading/writing restricted
HDFS files using the Spark API

I know about the --proxy-user flag but its effect is fixed within a
spark-submit.

I looked at the code and it seems the username is determined by the
SPARK_USER env var first (which seems to be always set) and then the
UserGroupInformation.
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/util/Utils.scala#L2247
What I'd like I guess is the UserGroupInformation to take priority.

Is there a way to make this work? Thank you!



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Impersonate-users-using-the-same-SparkContext-tp27735.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscr...@spark.apache.org

Reply via email to