Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
CR from pwendell
  • Loading branch information
Evan Chan committed Jan 12, 2014
commit cbabe809baf1f02c7c9097734b84a3c94ce364db
9 changes: 5 additions & 4 deletions core/src/main/scala/org/apache/spark/SparkContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ class SparkContext(

val isLocal = (master == "local" || master.startsWith("local["))

// Create a classLoader for use by the driver so that jars added via addJar are available to the driver
// Do this before all other initialization so that any thread pools created for this SparkContext
// uses the class loader
private[spark] val classLoader = new ExecutorURLClassLoader(Array.empty[URL], this.getClass.getClassLoader)
// Create a classLoader for use by the driver so that jars added via addJar are available to the
// driver. Do this before all other initialization so that any thread pools created for this
// SparkContext uses the class loader.
private[spark] val classLoader = new ExecutorURLClassLoader(Array.empty[URL],
this.getClass.getClassLoader)
Thread.currentThread.setContextClassLoader(classLoader)

// Create the Spark execution environment (cache, map output tracker, etc)
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/util/AkkaUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private[spark] object AkkaUtils {
*/
def createActorSystem(name: String, host: String, port: Int,
indestructible: Boolean = false,
classLoader: ClassLoader = this.getClass.getClassLoader)
classLoader: ClassLoader = Thread.currentThread.getContextClassLoader)
: (ActorSystem, Int) = {

val akkaThreads = System.getProperty("spark.akka.threads", "4").toInt
Expand Down