Github user vanzin commented on a diff in the pull request:
https://github.com/apache/spark/pull/3326#discussion_r20483179
--- Diff: core/src/test/scala/org/apache/spark/deploy/ClientSuite.scala ---
@@ -23,12 +23,26 @@ import org.scalatest.Matchers
class ClientSuite extends FunSuite with Matchers {
test("correctly validates driver jar URL's") {
ClientArguments.isValidJarUrl("http://someHost:8080/foo.jar") should
be (true)
- ClientArguments.isValidJarUrl("file://some/path/to/a/jarFile.jar")
should be (true)
+
+ // file scheme with authority is valid.
+ ClientArguments.isValidJarUrl("file://somehost/path/to/a/jarFile.jar")
should be (true)
+
+ // file scheme without authority is not valid.
+ ClientArguments.isValidJarUrl("file://jarFile.jar") should be (false)
+
+ // file scheme without authority but with triple slash is valid.
+ ClientArguments.isValidJarUrl("file:///some/path/to/a/jarFile.jar")
should be (true)
ClientArguments.isValidJarUrl("hdfs://someHost:1234/foo.jar") should
be (true)
ClientArguments.isValidJarUrl("hdfs://someHost:1234/foo") should be
(false)
ClientArguments.isValidJarUrl("/missing/a/protocol/jarfile.jar")
should be (false)
ClientArguments.isValidJarUrl("not-even-a-path.jar") should be (false)
+
+ // No authority
--- End diff --
Same: validation fails becase URI has no path, not because it doesn't have
an authority.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]