Repository: spark
Updated Branches:
  refs/heads/master 44d8b45a3 -> 1ea3e3dc9


[SPARK-4096][YARN]let ApplicationMaster accept executor memory argument in same 
format as JVM memory strings

Here `ApplicationMaster` accept executor memory argument only in number format, 
we should let it accept JVM style memory strings as well.

Author: WangTaoTheTonic <[email protected]>

Closes #2955 from WangTaoTheTonic/modifyDesc and squashes the following commits:

ab98c70 [WangTaoTheTonic] append parameter passed in
3779767 [WangTaoTheTonic] Update executor memory description in the help message


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

Branch: refs/heads/master
Commit: 1ea3e3dc9dd942402731751089bab2fb6ae29c7b
Parents: 44d8b45
Author: WangTaoTheTonic <[email protected]>
Authored: Tue Oct 28 12:31:42 2014 -0700
Committer: Andrew Or <[email protected]>
Committed: Tue Oct 28 12:31:42 2014 -0700

----------------------------------------------------------------------
 .../apache/spark/deploy/yarn/ApplicationMasterArguments.scala    | 4 ++--
 .../src/main/scala/org/apache/spark/deploy/yarn/ClientBase.scala | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/1ea3e3dc/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMasterArguments.scala
----------------------------------------------------------------------
diff --git 
a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMasterArguments.scala
 
b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMasterArguments.scala
index 3e6b96f..5c54e34 100644
--- 
a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMasterArguments.scala
+++ 
b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMasterArguments.scala
@@ -17,7 +17,7 @@
 
 package org.apache.spark.deploy.yarn
 
-import org.apache.spark.util.IntParam
+import org.apache.spark.util.{MemoryParam, IntParam}
 import collection.mutable.ArrayBuffer
 
 class ApplicationMasterArguments(val args: Array[String]) {
@@ -55,7 +55,7 @@ class ApplicationMasterArguments(val args: Array[String]) {
           numExecutors = value
           args = tail
 
-        case ("--worker-memory" | "--executor-memory") :: IntParam(value) :: 
tail =>
+        case ("--worker-memory" | "--executor-memory") :: MemoryParam(value) 
:: tail =>
           executorMemory = value
           args = tail
 

http://git-wip-us.apache.org/repos/asf/spark/blob/1ea3e3dc/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 0417cdd..8ea0e7c 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
@@ -379,7 +379,7 @@ private[spark] trait ClientBase extends Logging {
     val amArgs =
       Seq(amClass) ++ userClass ++ userJar ++ userArgs ++
       Seq(
-        "--executor-memory", args.executorMemory.toString,
+        "--executor-memory", args.executorMemory.toString + "m",
         "--executor-cores", args.executorCores.toString,
         "--num-executors ", args.numExecutors.toString)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to