File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,20 @@ private[spark] class MesosSchedulerBackend(
9090 " Spark home is not set; set it through the spark.home system " +
9191 " property, the SPARK_HOME environment variable or the SparkContext constructor" ))
9292 val environment = Environment .newBuilder()
93+ sc.conf.getOption(" spark.executor.extraClassPath" ).foreach { cp =>
94+ environment.addVariables(
95+ Environment .Variable .newBuilder().setName(" SPARK_CLASSPATH" ).setValue(cp).build())
96+ }
97+ val extraJavaOpts = sc.conf.getOption(" spark.executor.extraJavaOptions" )
98+ val extraLibraryPath = sc.conf.getOption(" spark.executor.extraLibraryPath" ).map { lp =>
99+ s " -Djava.library.path= $lp"
100+ }
101+ val extraOpts = Seq (extraJavaOpts, extraLibraryPath).flatten.mkString(" " )
102+ environment.addVariables(
103+ Environment .Variable .newBuilder()
104+ .setName(" SPARK_EXECUTOR_OPTS" )
105+ .setValue(extraOpts)
106+ .build())
93107 sc.executorEnvs.foreach { case (key, value) =>
94108 environment.addVariables(Environment .Variable .newBuilder()
95109 .setName(key)
You can’t perform that action at this time.
0 commit comments