aboutsummaryrefslogtreecommitdiff
path: root/launcher/src/test
diff options
context:
space:
mode:
authorMasayoshi TSUZUKI <tsudukim@oss.nttdata.co.jp>2015-04-28 07:55:21 -0400
committerSean Owen <sowen@cloudera.com>2015-04-28 07:56:36 -0400
commit268c419f1586110b90e68f98cd000a782d18828c (patch)
treeb45072fea128da46f3b1cf2fe4e964bbb6e8d92d /launcher/src/test
parent75905c57cd57bc5b650ac5f486580ef8a229b260 (diff)
downloadspark-268c419f1586110b90e68f98cd000a782d18828c.tar.gz
spark-268c419f1586110b90e68f98cd000a782d18828c.tar.bz2
spark-268c419f1586110b90e68f98cd000a782d18828c.zip
[SPARK-6435] spark-shell --jars option does not add all jars to classpath
Modified to accept double-quotated args properly in spark-shell.cmd. Author: Masayoshi TSUZUKI <tsudukim@oss.nttdata.co.jp> Closes #5227 from tsudukim/feature/SPARK-6435-2 and squashes the following commits: ac55787 [Masayoshi TSUZUKI] removed unnecessary argument. 60789a7 [Masayoshi TSUZUKI] Merge branch 'master' of https://github.com/apache/spark into feature/SPARK-6435-2 1fee420 [Masayoshi TSUZUKI] fixed test code for escaping '='. 0d4dc41 [Masayoshi TSUZUKI] - escaped comman and semicolon in CommandBuilderUtils.java - added random string to the temporary filename - double-quotation followed by `cmd /c` did not worked properly - no need to escape `=` by `^` - if double-quoted string ended with `\` like classpath, the last `\` is parsed as the escape charactor and the closing `"` didn't work properly 2a332e5 [Masayoshi TSUZUKI] Merge branch 'master' into feature/SPARK-6435-2 04f4291 [Masayoshi TSUZUKI] [SPARK-6435] spark-shell --jars option does not add all jars to classpath
Diffstat (limited to 'launcher/src/test')
-rw-r--r--launcher/src/test/java/org/apache/spark/launcher/CommandBuilderUtilsSuite.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/launcher/src/test/java/org/apache/spark/launcher/CommandBuilderUtilsSuite.java b/launcher/src/test/java/org/apache/spark/launcher/CommandBuilderUtilsSuite.java
index 1ae42eed8a..bc513ec9b3 100644
--- a/launcher/src/test/java/org/apache/spark/launcher/CommandBuilderUtilsSuite.java
+++ b/launcher/src/test/java/org/apache/spark/launcher/CommandBuilderUtilsSuite.java
@@ -74,7 +74,10 @@ public class CommandBuilderUtilsSuite {
assertEquals("\"a b c\"", quoteForBatchScript("a b c"));
assertEquals("\"a \"\"b\"\" c\"", quoteForBatchScript("a \"b\" c"));
assertEquals("\"a\"\"b\"\"c\"", quoteForBatchScript("a\"b\"c"));
- assertEquals("\"ab^=\"\"cd\"\"\"", quoteForBatchScript("ab=\"cd\""));
+ assertEquals("\"ab=\"\"cd\"\"\"", quoteForBatchScript("ab=\"cd\""));
+ assertEquals("\"a,b,c\"", quoteForBatchScript("a,b,c"));
+ assertEquals("\"a;b;c\"", quoteForBatchScript("a;b;c"));
+ assertEquals("\"a,b,c\\\\\"", quoteForBatchScript("a,b,c\\"));
}
@Test