Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/2711#discussion_r19492395
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/CoarseMesosSchedulerBackend.scala
---
@@ -120,16 +121,16 @@ private[spark] class CoarseMesosSchedulerBackend(
environment.addVariables(
Environment.Variable.newBuilder().setName("SPARK_CLASSPATH").setValue(cp).build())
}
- val extraJavaOpts = conf.getOption("spark.executor.extraJavaOptions")
+ val extraJavaOpts = conf.get("spark.executor.extraJavaOptions", "")
- val libraryPathOption = "spark.executor.extraLibraryPath"
- val extraLibraryPath = conf.getOption(libraryPathOption).map(p =>
s"-Djava.library.path=$p")
- val extraOpts = Seq(extraJavaOpts,
extraLibraryPath).flatten.mkString(" ")
+ val prefixEnv = conf.getOption("spark.executor.extraLibraryPath").map
{ p =>
+ Utils.prefixLibraryPath(Seq(p))
+ }.getOrElse("")
--- End diff --
I would add a comment here that explains why we have to set the environment
this way:
```
// Set the environment variable through the prefix because we need to
preserve the existing value
val prefixEnv = ...
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]