Skip to content

Commit

Permalink
SPARK-1350. Always use JAVA_HOME to run executor container JVMs.
Browse files Browse the repository at this point in the history
  • Loading branch information
sryza committed Apr 3, 2014
1 parent 841721e commit bb6d187
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,8 @@ trait ClientBase extends Logging {
}

// Command for the ApplicationMaster
var javaCommand = "java"
val javaHome = System.getenv("JAVA_HOME")
if ((javaHome != null && !javaHome.isEmpty()) || env.isDefinedAt("JAVA_HOME")) {
javaCommand = Environment.JAVA_HOME.$() + "/bin/java"
}

val commands = List[String](
javaCommand +
Environment.JAVA_HOME.$() + "/bin/java" +
" -server " +
JAVA_OPTS +
" " + args.amClass +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,8 @@ trait ExecutorRunnableUtil extends Logging {
}
*/

var javaCommand = "java"
val javaHome = System.getenv("JAVA_HOME")
if ((javaHome != null && !javaHome.isEmpty()) || env.isDefinedAt("JAVA_HOME")) {
javaCommand = Environment.JAVA_HOME.$() + "/bin/java"
}

val commands = List[String](javaCommand +
val commands = List[String](
Environment.JAVA_HOME.$() + "/bin/java" +
" -server " +
// Kill if OOM is raised - leverage yarn's failure handling to cause rescheduling.
// Not killing the task leaves various aspects of the executor and (to some extent) the jvm in
Expand Down

0 comments on commit bb6d187

Please sign in to comment.