Skip to content

Commit

Permalink
append parameter passed in
Browse files Browse the repository at this point in the history
  • Loading branch information
WangTaoTheTonic committed Oct 27, 2014
1 parent 3779767 commit ab98c70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -84,7 +84,7 @@ class ApplicationMasterArguments(val args: Array[String]) {
| Mutliple invocations are possible, each will be passed in order.
| --num-executors NUM Number of executors to start (Default: 2)
| --executor-cores NUM Number of cores for the executors (Default: 1)
| --executor-memory MEM Memory per executor in MB (Default: 1024)
| --executor-memory MEM Memory per executor (e.g. 1000M, 2G) (Default: 1G)
""".stripMargin)
System.exit(exitCode)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,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)

Expand Down

0 comments on commit ab98c70

Please sign in to comment.