You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by velvia <gi...@git.apache.org> on 2014/04/02 19:18:34 UTC

[GitHub] spark pull request: SPARK-1230: [WIP] Enable SparkContext.addJars(...

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

    https://github.com/apache/spark/pull/119#discussion_r11216177
  
    --- 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 --
    
    Yes true.  At the minimum will replace with an exception.


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