spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srowen <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-12220][Core]Make Utils.fetchFile suppor...
Date Thu, 10 Dec 2015 10:07:24 GMT
Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/10208#discussion_r47208027
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -331,6 +331,30 @@ private[spark] object Utils extends Logging {
       }
     
       /**
    +   * A file name may contain some invalid url characters, such as " ". This method will
convert the
    +   * file name to a raw path accepted by `java.net.URI(String)`.
    +   *
    +   * Note: the file name must not contain "/" or "\"
    +   */
    +  def encodeFileNameToURIRawPath(fileName: String): String = {
    --- End diff --
    
    Yes, it must be `file:/abc:xyz` since you need to tell it it needs to be treated as a
file name. Meh, at this point why not just `new URI("file:/" + fileName).getRawPath.substring(1)`
and keep it simple?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message