Skip to content

Commit

Permalink
move the class loader creation back to where it was in 0.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bharath Bhushan committed Apr 4, 2014
1 parent 33e6361 commit 89109d7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions core/src/main/scala/org/apache/spark/executor/Executor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ private[spark] class Executor(
conf.set("spark.local.dir", getYarnLocalDirs())
}

// Create our ClassLoader
// do this after SparkEnv creation so can access the SecurityManager
private val urlClassLoader = createClassLoader()
private val replClassLoader = addReplClassLoaderIfNeeded(urlClassLoader)
Thread.currentThread.setContextClassLoader(replClassLoader)

if (!isLocal) {
// Setup an uncaught exception handler for non-local mode.
// Make any thread terminations due to uncaught exceptions kill the entire
Expand Down Expand Up @@ -112,11 +118,6 @@ private[spark] class Executor(
}
}

// Create our ClassLoader
// do this after SparkEnv creation so can access the SecurityManager
private val urlClassLoader = createClassLoader()
private val replClassLoader = addReplClassLoaderIfNeeded(urlClassLoader)

// Akka's message frame size. If task result is bigger than this, we use the block manager
// to send the result back.
private val akkaFrameSize = AkkaUtils.maxFrameSizeBytes(conf)
Expand Down

0 comments on commit 89109d7

Please sign in to comment.