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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to