Skip to content
Snippets Groups Projects
Commit 8feb5caa authored by root's avatar root
Browse files

Fixed an issue with ordering of classloader setup that was causing Java deserializer to break

parent bf891a5c
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment