File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
core/src/main/scala/org/apache/spark/executor Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,11 @@ private[spark] class MesosExecutorBackend
6363
6464 logInfo(s " Registered with Mesos as executor ID $executorId with $cpusPerTask cpus " )
6565 this .driver = driver
66+ // Set a context class loader to be picked up by the serializer. Without this call
67+ // the serializer would default to the null class loader, and fail to find Spark classes
68+ // See SPARK-10986.
69+ Thread .currentThread().setContextClassLoader(this .getClass.getClassLoader)
70+
6671 val properties = Utils .deserialize[Array [(String , String )]](executorInfo.getData.toByteArray) ++
6772 Seq [(String , String )]((" spark.app.id" , frameworkInfo.getId.getValue))
6873 val conf = new SparkConf (loadDefaults = true ).setAll(properties)
You can’t perform that action at this time.
0 commit comments