holdenk commented on code in PR #37880:
URL: https://github.com/apache/spark/pull/37880#discussion_r1036499087


##########
core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala:
##########
@@ -157,24 +157,32 @@ private[spark] class SparkSubmit extends Logging {
 
     def doRunMain(): Unit = {
       if (args.proxyUser != null) {
-        val proxyUser = UserGroupInformation.createProxyUser(args.proxyUser,
-          UserGroupInformation.getCurrentUser())
-        try {
-          proxyUser.doAs(new PrivilegedExceptionAction[Unit]() {
-            override def run(): Unit = {
-              runMain(args, uninitLog)
-            }
-          })
-        } catch {
-          case e: Exception =>
-            // Hadoop's AuthorizationException suppresses the exception's 
stack trace, which
-            // makes the message printed to the output by the JVM not very 
helpful. Instead,
-            // detect exceptions with empty stack traces here, and treat them 
differently.
-            if (e.getStackTrace().length == 0) {
-              error(s"ERROR: ${e.getClass().getName()}: ${e.getMessage()}")
-            } else {
-              throw e
-            }
+        val isKubernetesClusterModeDriver = args.master.startsWith("k8s") &&
+          args.deployMode.equals("client") &&

Review Comment:
   So I _think_ here were checking for client mode because were actually 
looking for the case where it's submitted in clustermode and then this the 
sparksubmit instance that is running inside the cluster container, right?
   
   If so that would be great to have in a comment.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to