Github user hsaputra commented on a diff in the pull request: https://github.com/apache/incubator-spark/pull/625#discussion_r9939595 --- Diff: core/src/main/scala/org/apache/spark/deploy/ClientArguments.scala --- @@ -115,3 +110,7 @@ private[spark] class ClientArguments(args: Array[String]) { System.exit(exitCode) } } + +object ClientArguments { + def isValidJarUrl(s: String) = s.matches("(.+):(.+)jar") --- End diff -- Should we also check for "//" in the String to prevent something like "hdfs:test.jar"? Something like: s.matches("(.+)://([^/]+)jar") Tried with REPL: val s = "hdfs://test.jar" s: java.lang.String = hdfs://test.jar s.matches("(.+)://([^/]+)jar") res3: Boolean = true s.matches("(.+):(.+)jar") res4: Boolean = true val s2 = "hdfs:test.jar" s2: java.lang.String = hdfs:test.jar s2.matches("(.+)://(.+)jar") res5: Boolean = false s2.matches("(.+):(.+)jar") res6: Boolean = true We do not want dfs:test.jar to be true.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. To do so, please top-post your response. 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---