vanzin commented on a change in pull request #23546: [SPARK-23153][K8s] Support 
client dependencies with a Hadoop Compatible File System
URL: https://github.com/apache/spark/pull/23546#discussion_r260954464
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
 ##########
 @@ -794,18 +890,8 @@ private[spark] class SparkSubmit extends Logging {
       logInfo("\n")
     }
 
-    val loader =
-      if (sparkConf.get(DRIVER_USER_CLASS_PATH_FIRST)) {
-        new ChildFirstURLClassLoader(new Array[URL](0),
-          Thread.currentThread.getContextClassLoader)
-      } else {
-        new MutableURLClassLoader(new Array[URL](0),
-          Thread.currentThread.getContextClassLoader)
-      }
-    Thread.currentThread.setContextClassLoader(loader)
-
     for (jar <- childClasspath) {
-      addJarToClasspath(jar, loader)
+      addJarToClasspath(jar, getSubmitClassLoader(sparkConf))
 
 Review comment:
   Ok, `getSubmitClassLoader` will just chain class loaders, so you will not 
actually lose the previous state, but you'll end up with an unnecessary long 
class loader hierarchy, instead of having just one class loader specific for 
the app.

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

Reply via email to