aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/java
diff options
context:
space:
mode:
authorMarcelo Vanzin <vanzin@cloudera.com>2016-05-10 10:35:54 -0700
committerMarcelo Vanzin <vanzin@cloudera.com>2016-05-10 10:35:54 -0700
commit0b9cae42426e14060bc6182c037fd715f35a2d23 (patch)
treefbf356424566ce8bd027fa034f0be6e58ce73066 /core/src/test/java
parent36c5892b4631d1d5d70e569fce12efedd82bdef0 (diff)
downloadspark-0b9cae42426e14060bc6182c037fd715f35a2d23.tar.gz
spark-0b9cae42426e14060bc6182c037fd715f35a2d23.tar.bz2
spark-0b9cae42426e14060bc6182c037fd715f35a2d23.zip
[SPARK-11249][LAUNCHER] Throw error if app resource is not provided.
Without this, the code would build an invalid spark-submit command line, and a more cryptic error would be presented to the user. Also, expose a constant that allows users to set a dummy resource in cases where they don't need an actual resource file; for backwards compatibility, that uses the same "spark-internal" resource that Spark itself uses. Tested via unit tests, run-example, spark-shell, and running the thrift server with mixed spark and hive command line arguments. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #12909 from vanzin/SPARK-11249.
Diffstat (limited to 'core/src/test/java')
-rw-r--r--core/src/test/java/org/apache/spark/launcher/SparkLauncherSuite.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/test/java/org/apache/spark/launcher/SparkLauncherSuite.java b/core/src/test/java/org/apache/spark/launcher/SparkLauncherSuite.java
index 3e47bfc274..8ca54b24d8 100644
--- a/core/src/test/java/org/apache/spark/launcher/SparkLauncherSuite.java
+++ b/core/src/test/java/org/apache/spark/launcher/SparkLauncherSuite.java
@@ -94,7 +94,7 @@ public class SparkLauncherSuite {
SparkLauncher launcher = new SparkLauncher(env)
.setSparkHome(System.getProperty("spark.test.home"))
.setMaster("local")
- .setAppResource("spark-internal")
+ .setAppResource(SparkLauncher.NO_RESOURCE)
.addSparkArg(opts.CONF,
String.format("%s=-Dfoo=ShouldBeOverriddenBelow", SparkLauncher.DRIVER_EXTRA_JAVA_OPTIONS))
.setConf(SparkLauncher.DRIVER_EXTRA_JAVA_OPTIONS,