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

    https://github.com/apache/spark/pull/3233#discussion_r24355350
  
    --- Diff: core/src/main/scala/org/apache/spark/executor/Executor.scala ---
    @@ -344,18 +353,20 @@ private[spark] class Executor(
               env.securityManager, hadoopConf, timestamp, useCache = !isLocal)
             currentFiles(name) = timestamp
           }
    -      for ((name, timestamp) <- newJars if currentJars.getOrElse(name, 
-1L) < timestamp) {
    -        logInfo("Fetching " + name + " with timestamp " + timestamp)
    -        // Fetch file with useCache mode, close cache for local mode.
    -        Utils.fetchFile(name, new File(SparkFiles.getRootDirectory), conf,
    -          env.securityManager, hadoopConf, timestamp, useCache = !isLocal)
    -        currentJars(name) = timestamp
    -        // Add it to our class loader
    +      for ((name, timestamp) <- newJars) {
             val localName = name.split("/").last
    -        val url = new File(SparkFiles.getRootDirectory, 
localName).toURI.toURL
    -        if (!urlClassLoader.getURLs.contains(url)) {
    -          logInfo("Adding " + url + " to class loader")
    -          urlClassLoader.addURL(url)
    +        if 
(currentJars.get(name).orElse(currentJars.get(localName)).getOrElse(-1L) < 
timestamp) {
    --- End diff --
    
    Actually, it's because, unlike the initial list of jars distributed by yarn 
(which is now explicitly provided in the command line), the executor doesn't 
know about the initial list of files. So doing the same thing would require 
implementing that.
    
    Let me try to remember why exactly I had to add this in the first place. 
It's been a while.


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