You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/28 19:16:54 UTC

[GitHub] vanzin commented on a change in pull request #23922: [SPARK-25689][FOLLOW-UP][CORE] Get proxy user's delegation tokens

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org