Skip to content

Commit f14b00a

Browse files
nishkamravi2rxin
authored andcommitted
[SPARK-2151] Recognize memory format for spark-submit
int format expected for input memory parameter when spark-submit is invoked in standalone cluster mode. Make it consistent with rest of Spark. Author: nravi <[email protected]> Closes apache#1095 from nishkamravi2/master and squashes the following commits: 2b630f9 [nravi] Accept memory input as "30g", "512M" instead of an int value, to be consistent with rest of Spark 3bf8fad [nravi] Merge branch 'master' of https://github.com/apache/spark 5423a03 [nravi] Merge branch 'master' of https://github.com/apache/spark eb663ca [nravi] Merge branch 'master' of https://github.com/apache/spark df2aeb1 [nravi] Improved fix for ConcurrentModificationIssue (Spark-1097, Hadoop-10456) 6b840f0 [nravi] Undo the fix for SPARK-1758 (the problem is fixed) 5108700 [nravi] Fix in Spark for the Concurrent thread modification issue (SPARK-1097, HADOOP-10456) 681b36f [nravi] Fix for SPARK-1758: failing test org.apache.spark.JavaAPISuite.wholeTextFiles
1 parent 777c595 commit f14b00a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/src/main/scala/org/apache/spark/deploy/ClientArguments.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import scala.collection.mutable.ListBuffer
2121

2222
import org.apache.log4j.Level
2323

24+
import org.apache.spark.util.MemoryParam
25+
2426
/**
2527
* Command-line parser for the driver client.
2628
*/
@@ -51,8 +53,8 @@ private[spark] class ClientArguments(args: Array[String]) {
5153
cores = value.toInt
5254
parse(tail)
5355

54-
case ("--memory" | "-m") :: value :: tail =>
55-
memory = value.toInt
56+
case ("--memory" | "-m") :: MemoryParam(value) :: tail =>
57+
memory = value
5658
parse(tail)
5759

5860
case ("--supervise" | "-s") :: tail =>

0 commit comments

Comments
 (0)