vanzin commented on a change in pull request #23922:
[SPARK-25689][FOLLOW-UP][CORE] Get proxy user's delegation tokens
URL: https://github.com/apache/spark/pull/23922#discussion_r261343218
##########
File path:
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
##########
@@ -404,7 +405,7 @@ class CoarseGrainedSchedulerBackend(scheduler:
TaskSchedulerImpl, val rpcEnv: Rp
val ugi = UserGroupInformation.getCurrentUser()
val tokens = if (dtm.renewalEnabled) {
dtm.start()
- } else if (ugi.hasKerberosCredentials()) {
+ } else if (ugi.hasKerberosCredentials() || ugi.getAuthenticationMethod
== PROXY) {
Review comment:
Use `SparkHadoopUtil.get.isProxyUser`.
I think I need to test this, though. `dtm.obtainDelegationTokens(creds)`
will probably fail if you are running as proxy user but does not have access to
the real UGI - e.g. submitting an app in cluster mode using a proxy user.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]