Uh oh!
There was an error while loading. Please reload this page.
[SPARK-4075][SPARK-4434] Fix the URI validation logic for Application Jar name. - #3326
[SPARK-4075][SPARK-4434] Fix the URI validation logic for Application Jar name.#3326sarutak wants to merge 8 commits into
Conversation
SparkQA
commented
Nov 17, 2014
Test build #23503 has started for PR 3326 at commit
|
SparkQA
commented
Nov 17, 2014
Test build #23503 has finished for PR 3326 at commit
|
AmplabJenkins
commented
Nov 17, 2014
Test PASSed. |
There was a problem hiding this comment.
Not your change, but this should not be a valid jar URL right? My understanding is that one or three slashes are valid, but not two.
andrewor14
commented
Nov 18, 2014
Hey @sarutak also are you resubmitting your original change for SPARK-4434? |
sarutak
commented
Nov 18, 2014
O.K, I'll resubmit original change including this test case and fixing to handle double slashed |
In deploy.ClientArguments.isValidJarUrl, the url is checked as follows.
def isValidJarUrl(s: String): Boolean = s.matches("(.+):(.+)jar")
So, it allows like 'hdfs:file.jar' (no authority).
Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp>
Closesapache#2925 from sarutak/uri-syntax-check-improvement and squashes the following commits:
cf06173 [Kousuke Saruta] Improved URI syntax checkingSparkQA
commented
Nov 18, 2014
Test build #23520 has started for PR 3326 at commit
|
SparkQA
commented
Nov 18, 2014
Test build #23520 has finished for PR 3326 at commit
|
AmplabJenkins
commented
Nov 18, 2014
Test PASSed. |
andrewor14
commented
Nov 18, 2014
Thanks, can you rename the title of the PR now that this is not just tests anymore? |
sarutak
commented
Nov 18, 2014
Thanks for pointing out. I've now modified. |
There was a problem hiding this comment.
If you're changing the file URL might as well change the hdfs one.
vanzin
commented
Nov 18, 2014
Just nits w.r.t. naming of things, otherwise looks ok. |
SparkQA
commented
Nov 18, 2014
Test build #23538 has started for PR 3326 at commit
|
SparkQA
commented
Nov 18, 2014
Test build #23538 has finished for PR 3326 at commit
|
AmplabJenkins
commented
Nov 18, 2014
Test FAILed. |
SparkQA
commented
Nov 18, 2014
Test build #23539 has started for PR 3326 at commit
|
SparkQA
commented
Nov 18, 2014
Test build #23539 has finished for PR 3326 at commit
|
AmplabJenkins
commented
Nov 18, 2014
Test PASSed. |
SparkQA
commented
Nov 18, 2014
Test build #23552 has started for PR 3326 at commit
|
andrewor14
commented
Nov 18, 2014
sarutak
commented
Nov 18, 2014
I think, double-slashed file scheme is valid in according to the specification of URI. Or, should we invalid double-slashed file scheme ( |
vanzin
commented
Nov 18, 2014
@andrewor14 all the URIs you mention as not valid are actually valid.
So those are all valid URIs, which is why no exception is thrown when you construct the URI object. |
andrewor14
commented
Nov 18, 2014
I see. By "valid" here we mean the URI provides some combination of the scheme, the path and the authority. However, when you do two-slashes on I suppose then it is the user's responsibility to not make this mistake. We can't prevent this because "path" could be a valid authority or hostname here and we won't be able to tell the difference. |
vanzin
commented
Nov 18, 2014
That's because you assume wrong. :-) "//" is the indication that the next component is the authority. You can omit the authority by not specifying "//". "file" is not special. It works just like any other URI (http, hdfs or otherwise). |
SparkQA
commented
Nov 18, 2014
Test build #23552 has finished for PR 3326 at commit
|
AmplabJenkins
commented
Nov 18, 2014
Test PASSed. |
andrewor14
commented
Nov 18, 2014
Ok, I'm merging this into master and 1.2. Not going to merge this into 1.1 because the benefit here is not worth potentially causing another regression. |
… Jar name. This PR adds a regression test for SPARK-4434. Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp> Closesapache#3326 from sarutak/add-triple-slash-testcase and squashes the following commits: 82bc9cc [Kousuke Saruta] Fixed wrong grammar in comment 9149027 [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into add-triple-slash-testcase c1c80ca [Kousuke Saruta] Fixed style 4f30210 [Kousuke Saruta] Modified comments 9e09da2 [Kousuke Saruta] Fixed URI validation for jar file d4b99ef [Kousuke Saruta] [SPARK-4075] [Deploy] Jar url validation is not enough for Jar file ac79906 [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into add-triple-slash-testcase 6d4f47e [Kousuke Saruta] Added a test case as a regression check for SPARK-4434
… Jar name. This PR adds a regression test for SPARK-4434. Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp> Closes#3326 from sarutak/add-triple-slash-testcase and squashes the following commits: 82bc9cc [Kousuke Saruta] Fixed wrong grammar in comment 9149027 [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into add-triple-slash-testcase c1c80ca [Kousuke Saruta] Fixed style 4f30210 [Kousuke Saruta] Modified comments 9e09da2 [Kousuke Saruta] Fixed URI validation for jar file d4b99ef [Kousuke Saruta] [SPARK-4075] [Deploy] Jar url validation is not enough for Jar file ac79906 [Kousuke Saruta] Merge branch 'master' of git://git.apache.org/spark into add-triple-slash-testcase 6d4f47e [Kousuke Saruta] Added a test case as a regression check for SPARK-4434 (cherry picked from commit bfebfd8) Signed-off-by: Andrew Or <andrew@databricks.com>
andrewor14
commented
Nov 19, 2014
Hey @sarutak mind closing this? It's already merged |
sarutak
commented
Nov 19, 2014
Thanks for notification. I close this PR. |
This PR adds a regression test for SPARK-4434.