Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3233#discussion_r24306049
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala ---
    @@ -453,12 +453,24 @@ private[spark] class ApplicationMaster(
       private def startUserApplication(): Thread = {
         logInfo("Starting the user application in a separate Thread")
         System.setProperty("spark.executor.instances", 
args.numExecutors.toString)
    +
    +    val classpath = Client.getUserClasspath(null, sparkConf)
    +    val urls = classpath.map { entry =>
    +      new URL("file:" + new File(entry.getPath()).getAbsolutePath())
    +    }
    +    val userClassLoader =
    +      if (Client.isUserClassPathFirst(sparkConf, true)) {
    +        new ChildFirstURLClassLoader(urls, 
Utils.getContextOrSparkClassLoader)
    +      } else {
    +        new MutableURLClassLoader(urls, Utils.getContextOrSparkClassLoader)
    +      }
    --- End diff --
    
    can we add a short comment that explains this is doing the user class path 
first thing


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to