spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrewor14 <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-1900] Fix running PySpark files on YARN
Date Fri, 23 May 2014 07:35:08 GMT
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/853#discussion_r12988570
  
    --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala ---
    @@ -1166,4 +1166,35 @@ private[spark] object Utils extends Logging {
             true
         }
       }
    +
    +  /** Return the URI of the input path. If a relative path is given, assume it is local.
*/
    +  def resolveURI(path: String, testWindows: Boolean = false): URI = {
    +
    +    // On Windows, file names cannot contain backslashes and colons,
    +    // and each drive contains only a single alphabet character
    +    val windows = isWindows || testWindows
    +    val sanitizedPath = if (windows) path.replace("\\", "/") else path
    +    val windowsDrive = "([a-zA-Z])".r
    +
    +    val uri = new URI(sanitizedPath)
    +    uri.getScheme match {
    +      case windowsDrive(d) if windows =>
    +        new URI("file:/" + uri.toString.stripPrefix("/"))
    +      case null =>
    +        val fragment = uri.getFragment
    --- End diff --
    
    There is a small bullet point that explains this: http://people.apache.org/~pwendell/spark-1.0.0-rc7-docs/running-on-yarn.html#important-notes
    
    I'll add a comment here.


---
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.
---

Mime
View raw message