aboutsummaryrefslogtreecommitdiff
path: root/core/src/test
diff options
context:
space:
mode:
authorjerryshao <sshao@hortonworks.com>2016-04-01 10:52:13 -0700
committerMarcelo Vanzin <vanzin@cloudera.com>2016-04-01 10:52:13 -0700
commit8ba2b7f28fee39c4839e5ea125bd25f5091a3a1e (patch)
treebbe9310838ffdf087dc628d4c9993ba58c932ce1 /core/src/test
parent58e6bc827f1f9dc1afee07dca1bee1f56553dd20 (diff)
downloadspark-8ba2b7f28fee39c4839e5ea125bd25f5091a3a1e.tar.gz
spark-8ba2b7f28fee39c4839e5ea125bd25f5091a3a1e.tar.bz2
spark-8ba2b7f28fee39c4839e5ea125bd25f5091a3a1e.zip
[SPARK-12343][YARN] Simplify Yarn client and client argument
## What changes were proposed in this pull request? Currently in Spark on YARN, configurations can be passed through SparkConf, env and command arguments, some parts are duplicated, like client argument and SparkConf. So here propose to simplify the command arguments. ## How was this patch tested? This patch is tested manually with unit test. CC vanzin tgravescs , please help to suggest this proposal. The original purpose of this JIRA is to remove `ClientArguments`, through refactoring some arguments like `--class`, `--arg` are not so easy to replace, so here I remove the most part of command line arguments, only keep the minimal set. Author: jerryshao <sshao@hortonworks.com> Closes #11603 from jerryshao/SPARK-12343.
Diffstat (limited to 'core/src/test')
-rw-r--r--core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala19
1 files changed, 10 insertions, 9 deletions
diff --git a/core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala b/core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala
index 96cb4fd0eb..2718976992 100644
--- a/core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala
+++ b/core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala
@@ -199,21 +199,21 @@ class SparkSubmitSuite
val (childArgs, classpath, sysProps, mainClass) = prepareSubmitEnvironment(appArgs)
val childArgsStr = childArgs.mkString(" ")
childArgsStr should include ("--class org.SomeClass")
- childArgsStr should include ("--executor-memory 5g")
- childArgsStr should include ("--driver-memory 4g")
- childArgsStr should include ("--executor-cores 5")
childArgsStr should include ("--arg arg1 --arg arg2")
- childArgsStr should include ("--queue thequeue")
childArgsStr should include regex ("--jar .*thejar.jar")
- childArgsStr should include regex ("--addJars .*one.jar,.*two.jar,.*three.jar")
- childArgsStr should include regex ("--files .*file1.txt,.*file2.txt")
- childArgsStr should include regex ("--archives .*archive1.txt,.*archive2.txt")
mainClass should be ("org.apache.spark.deploy.yarn.Client")
classpath should have length (0)
+
+ sysProps("spark.executor.memory") should be ("5g")
+ sysProps("spark.driver.memory") should be ("4g")
+ sysProps("spark.executor.cores") should be ("5")
+ sysProps("spark.yarn.queue") should be ("thequeue")
+ sysProps("spark.yarn.dist.jars") should include regex (".*one.jar,.*two.jar,.*three.jar")
+ sysProps("spark.yarn.dist.files") should include regex (".*file1.txt,.*file2.txt")
+ sysProps("spark.yarn.dist.archives") should include regex (".*archive1.txt,.*archive2.txt")
sysProps("spark.app.name") should be ("beauty")
sysProps("spark.ui.enabled") should be ("false")
sysProps("SPARK_SUBMIT") should be ("true")
- sysProps.keys should not contain ("spark.jars")
}
test("handles YARN client mode") {
@@ -249,7 +249,8 @@ class SparkSubmitSuite
sysProps("spark.executor.instances") should be ("6")
sysProps("spark.yarn.dist.files") should include regex (".*file1.txt,.*file2.txt")
sysProps("spark.yarn.dist.archives") should include regex (".*archive1.txt,.*archive2.txt")
- sysProps("spark.jars") should include regex (".*one.jar,.*two.jar,.*three.jar,.*thejar.jar")
+ sysProps("spark.yarn.dist.jars") should include
+ regex (".*one.jar,.*two.jar,.*three.jar,.*thejar.jar")
sysProps("SPARK_SUBMIT") should be ("true")
sysProps("spark.ui.enabled") should be ("false")
}