diff options
author | root <root@ip-10-8-51-66.ec2.internal> | 2012-09-21 05:13:19 +0000 |
---|---|---|
committer | root <root@ip-10-8-51-66.ec2.internal> | 2012-09-21 05:13:19 +0000 |
commit | 8feb5caacd87d72dc15a45ec3c5aea3592de80cb (patch) | |
tree | 5ba8f38568f7ae7f5ac25fad9532bd81ad3005cf /core | |
parent | bf891a5c18342c01b2065c4cd41fd96df11ebd7d (diff) | |
download | spark-8feb5caacd87d72dc15a45ec3c5aea3592de80cb.tar.gz spark-8feb5caacd87d72dc15a45ec3c5aea3592de80cb.tar.bz2 spark-8feb5caacd87d72dc15a45ec3c5aea3592de80cb.zip |
Fixed an issue with ordering of classloader setup that was causing Java deserializer to break
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/spark/executor/Executor.scala | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/src/main/scala/spark/executor/Executor.scala b/core/src/main/scala/spark/executor/Executor.scala index 8f975c52d4..9999b6ba80 100644 --- a/core/src/main/scala/spark/executor/Executor.scala +++ b/core/src/main/scala/spark/executor/Executor.scala @@ -38,6 +38,10 @@ class Executor extends Logging { System.setProperty(key, value) } + // Create our ClassLoader and set it on this thread + urlClassLoader = createClassLoader() + Thread.currentThread.setContextClassLoader(urlClassLoader) + // Initialize Spark environment (using system properties read above) env = SparkEnv.createFromSystemProperties(slaveHostname, 0, false, false) SparkEnv.set(env) @@ -45,11 +49,6 @@ class Executor extends Logging { // Start worker thread pool threadPool = new ThreadPoolExecutor( 1, 128, 600, TimeUnit.SECONDS, new SynchronousQueue[Runnable]) - - // Create our ClassLoader and set it on this thread - urlClassLoader = createClassLoader() - Thread.currentThread.setContextClassLoader(urlClassLoader) - } def launchTask(context: ExecutorBackend, taskId: Long, serializedTask: ByteBuffer) { |