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/07/17 10:08:19 UTC

[GitHub] [spark] jerryshao commented on a change in pull request #25176: [SPARK-28417][CORE] Wrap File Glob Resolution in DoAs to use ProxyUser Credentials

jerryshao commented on a change in pull request #25176: [SPARK-28417][CORE] Wrap File Glob Resolution in DoAs to use ProxyUser Credentials
URL: https://github.com/apache/spark/pull/25176#discussion_r304322080
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
 ##########
 @@ -378,10 +378,24 @@ private[spark] class SparkSubmit extends Logging {
     }
 
     // Resolve glob path for different resources.
-    args.jars = Option(args.jars).map(resolveGlobPaths(_, hadoopConf)).orNull
-    args.files = Option(args.files).map(resolveGlobPaths(_, hadoopConf)).orNull
-    args.pyFiles = Option(args.pyFiles).map(resolveGlobPaths(_, hadoopConf)).orNull
-    args.archives = Option(args.archives).map(resolveGlobPaths(_, hadoopConf)).orNull
+    val proxyUser = if (args.proxyUser != null) {
+      UserGroupInformation.createProxyUser(args.proxyUser, UserGroupInformation.getCurrentUser)
 
 Review comment:
   It would be better to follow here (SparkSubmit.scala#146) to specify `hadoopConf`.
   
   ```scala
         val hadoopConf = SparkHadoopUtil.get.newConfiguration(sparkConf)
         val ugi = if (args.proxyUser != null) {
           UserGroupInformation.createProxyUser(args.proxyUser,
             UserGroupInformation.getCurrentUser(hadoopConf))
         } else {
           UserGroupInformation.getCurrentUser(hadoopConf)
         }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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