spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hsaputra <>
Subject [GitHub] incubator-spark pull request: SPARK-1111: URL Validation Throws Er...
Date Fri, 21 Feb 2014 08:59:04 GMT
Github user hsaputra commented on a diff in the pull request:
    --- Diff: core/src/main/scala/org/apache/spark/deploy/ClientArguments.scala ---
    @@ -115,3 +110,7 @@ private[spark] class ClientArguments(args: Array[String]) {
    +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
      res3: Boolean = true
      res4: Boolean = true
    val s2 = "hdfs:test.jar"
      s2: java.lang.String = hdfs:test.jar
      res5: Boolean = false
      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 or file a JIRA ticket with INFRA.

View raw message