Skip to content

Commit 61930bd

Browse files
mengxrpwendell
authored andcommitted
[FIX: SPARK-1376] use --arg instead of --args in SparkSubmit to avoid warning messages
Even if users use `--arg`, `SparkSubmit` still uses `--args` for child args internally, which triggers a warning message that may confuse users: ~~~ --args is deprecated. Use --arg instead. ~~~ @sryza Does it look good to you? Author: Xiangrui Meng <[email protected]> Closes #485 from mengxr/submit-arg and squashes the following commits: 5e1b9fe [Xiangrui Meng] update test cebbeb7 [Xiangrui Meng] use --arg instead of --args in SparkSubmit to avoid warning messages (cherry picked from commit 662c860) Signed-off-by: Patrick Wendell <[email protected]>
1 parent bf47559 commit 61930bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ object SparkSubmit {
196196
childArgs ++= appArgs.childArgs
197197
} else if (clusterManager == YARN) {
198198
for (arg <- appArgs.childArgs) {
199-
childArgs += ("--args", arg)
199+
childArgs += ("--arg", arg)
200200
}
201201
}
202202
}

core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class SparkSubmitSuite extends FunSuite with ShouldMatchers {
110110
childArgsStr should include ("--executor-memory 5g")
111111
childArgsStr should include ("--driver-memory 4g")
112112
childArgsStr should include ("--executor-cores 5")
113-
childArgsStr should include ("--args arg1 --args arg2")
113+
childArgsStr should include ("--arg arg1 --arg arg2")
114114
childArgsStr should include ("--queue thequeue")
115115
childArgsStr should include ("--files file1.txt,file2.txt")
116116
childArgsStr should include ("--archives archive1.txt,archive2.txt")

0 commit comments

Comments
 (0)