Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/2711#discussion_r18598450
--- Diff:
core/src/main/scala/org/apache/spark/deploy/worker/CommandUtils.scala ---
@@ -34,8 +34,17 @@ object CommandUtils extends Logging {
// SPARK-698: do not call the run.cmd script, as process.destroy()
// fails to kill a process tree on Windows
- Seq(runner) ++ buildJavaOpts(command, memory, sparkHome) ++
Seq(command.mainClass) ++
- command.arguments
+ buildPrefixEnv(command) ++ Seq(runner) ++ buildJavaOpts(command,
memory, sparkHome) ++
+ Seq(command.mainClass) ++ command.arguments
+ }
+
+ private def buildPrefixEnv(command: Command): Seq[String] = {
+ if (command.libraryPathEntries.size > 0) {
+ val libraryPaths = command.libraryPathEntries
+
Seq(s"${Utils.libraryPath}=${libraryPaths.mkString(File.pathSeparator)}")
--- End diff --
Just an observation that this won't work if the launcher process and target
machine are running different OSes. Not sure whether that's supported, and I'm
sure this is done in other places, but I've seen reports of people being bit by
this (especially those using Windows).
---
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]