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

    https://github.com/apache/spark/pull/119#discussion_r10531950
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -767,6 +781,20 @@ class SparkContext(
               case _ =>
                 path
             }
    +
    +        // Add jar to driver class loader so it is available for driver,
    +        // even if it is not on the classpath
    +        uri.getScheme match {
    +          case null | "file" | "local" =>
    +            // Assume file exists on current (driver) node as well.  
Unlike executors, driver
    +            // doesn't need to download the jar since it's local.
    +            addUrlToDriverLoader(new URL("file:" + uri.getPath))
    +          case "http" | "https" | "ftp" =>
    +            // Should be handled by the URLClassLoader, pass along entire 
URL
    +            addUrlToDriverLoader(new URL(path))
    +          case other =>
    +            logWarning(s"This URI scheme for URI $path is not supported by 
the driver class loader")
    --- End diff --
    
    The other option BTW would be to throw an exception, since the user 
explicitly enabled loading JARs in the driver. In general logging a warning and 
hoping the user will notice it is not great.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to