Github user mateiz commented on a diff in the pull request: https://github.com/apache/spark/pull/119#discussion_r10531729 --- 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 -- This is a poor way to handle this case. Why don't we create a ClassLoader from HDFS or whatever the other URI scheme is? In general if some URI scheme is supported on the workers, it should also be supported on the driver.
--- 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. ---