-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-6435] spark-shell --jars option does not add all jars to classpath #5227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
04f4291
2a332e5
0d4dc41
1fee420
60789a7
ac55787
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -244,7 +244,7 @@ static String quoteForBatchScript(String arg) { | |
| boolean needsQuotes = false; | ||
| for (int i = 0; i < arg.length(); i++) { | ||
| int c = arg.codePointAt(i); | ||
| if (Character.isWhitespace(c) || c == '"' || c == '=') { | ||
| if (Character.isWhitespace(c) || c == '"' || c == '=' || c == ',' || c == ';') { | ||
| needsQuotes = true; | ||
| break; | ||
| } | ||
|
|
@@ -261,15 +261,14 @@ static String quoteForBatchScript(String arg) { | |
| quoted.append('"'); | ||
| break; | ||
|
|
||
| case '=': | ||
| quoted.append('^'); | ||
| break; | ||
|
|
||
| default: | ||
| break; | ||
| } | ||
| quoted.appendCodePoint(cp); | ||
| } | ||
| if (arg.codePointAt(arg.length() - 1) == '\\') { | ||
| quoted.append("\\"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is indented too far. Why would a backslash need escaping only in the final position?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In batch, backslash
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, I assumed you would escape all backslashes if they are the escape character. Is that not necessary?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Backslash is escape character only when followed by
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, so it's not a general escape character, got it. |
||
| } | ||
| quoted.append("\""); | ||
| return quoted.toString(); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you run SparkLauncherSuite on Windows? I added this specifically to fix an issue with that path (see 92a9cfb).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've run
SparkLauncherSuiteon Windows and it's OK.If double-quotation is parsed properly,
=in double-quotation is not need to be escaped.