apache/incubator-spark — pull request #299 by velvia (2013-12-27 01:13:05+00:00)
Title: Fix classloader bug with SparkContext.addJars()

There is currently a bug where the jars added using `SparkContext.addJars()` are not actually made available to the driver application or Spark itself. This occurs because there is no classloader in the driver to make these classes available. I noticed this during job server development, but this fix is applicable for any Spark applications which desires to load additional jars using `addJars()` instead of putting all the jars in the CLASSPATH or SPARK_CLASSPATH.

Adds a driver-specific class loader that knows about the jars added via addJar(), and initialize it first thing in SparkEnv, so that all other ThreadPool/ActorSystem initialization will take advantage of the classloader, and user-added jars are made available to all Spark subsystems.