Github user james64 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19834#discussion_r153524308
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -1846,7 +1846,16 @@ class SparkContext(config: SparkConf) extends 
Logging {
             Utils.validateURL(uri)
             uri.getScheme match {
               // A JAR file which exists only on the driver node
    -          case null | "file" => addJarFile(new File(uri.getPath))
    +          case null =>
    +            // SPARK-22585 path without schema is not url encoded
    +            addJarFile(new File(uri.getRawPath))
    +
    +//            val encoded = java.net.URLEncoder.encode(path, "UTF-8")
    +//            val newUri = new URI(encoded)
    +//            addJarFile(new File(newUri.getPath)
    --- End diff --
    
    These three commented lines shows solution which would url encode the path 
and then pass it to URI once again. If we can identify any advantage in this 
approach we can use it. Otherwise I am for using `getRawPath` one liner.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to