spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tgra...@apache.org
Subject git commit: SPARK-1350. Always use JAVA_HOME to run executor container JVMs.
Date Fri, 04 Apr 2014 13:54:12 GMT
Repository: spark
Updated Branches:
  refs/heads/master ee6e9e7d8 -> 7f32fd42a


SPARK-1350. Always use JAVA_HOME to run executor container JVMs.

Author: Sandy Ryza <sandy@cloudera.com>

Closes #313 from sryza/sandy-spark-1350 and squashes the following commits:

bb6d187 [Sandy Ryza] SPARK-1350. Always use JAVA_HOME to run executor container JVMs.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7f32fd42
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7f32fd42
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7f32fd42

Branch: refs/heads/master
Commit: 7f32fd42aaadcf6626b4d8bcf6295203b43b2037
Parents: ee6e9e7
Author: Sandy Ryza <sandy@cloudera.com>
Authored: Fri Apr 4 08:54:04 2014 -0500
Committer: Thomas Graves <tgraves@apache.org>
Committed: Fri Apr 4 08:54:04 2014 -0500

----------------------------------------------------------------------
 .../scala/org/apache/spark/deploy/yarn/ClientBase.scala     | 8 +-------
 .../org/apache/spark/deploy/yarn/ExecutorRunnableUtil.scala | 9 ++-------
 2 files changed, 3 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/7f32fd42/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala
----------------------------------------------------------------------
diff --git a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala
index 6568003..bc26790 100644
--- a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala
+++ b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala
@@ -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 +

http://git-wip-us.apache.org/repos/asf/spark/blob/7f32fd42/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnableUtil.scala
----------------------------------------------------------------------
diff --git a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnableUtil.scala
b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnableUtil.scala
index da0a6f7..2079697 100644
--- a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnableUtil.scala
+++ b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ExecutorRunnableUtil.scala
@@ -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


Mime
View raw message