Cheng Lian created SPARK-11595:
----------------------------------

             Summary: "ADD JAR" doesn't work if the given path contains URL 
scheme like "file:/" and "hdfs:/"
                 Key: SPARK-11595
                 URL: https://issues.apache.org/jira/browse/SPARK-11595
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 1.5.2, 1.6.0
            Reporter: Cheng Lian
            Assignee: Cheng Lian
            Priority: Blocker


When handling {{ADD JAR}}, PR #8909 constructs a {{java.io.File}} first using 
the input jar path, and then converts it into a URL 
([here|https://github.com/apache/spark/pull/8909/files#diff-d613c921507243c65591c003a348f5f3R180]).
 This works file for local file path without a URL scheme (e.g. 
{{/tmp/a.jar}}). However, {{java.io.File.toURI}} returns unexpected result when 
given a path containing a URL scheme (e.g. {{file:///tmp/a.jar}} or 
{{hdfs://host:9000/path/to/a.jar}}):
{noformat}
scala> new java.io.File("file:///tmp/file").toURI
res1: java.net.URI = file:/Users/lian/local/src/spark/workspace-a/file:/tmp/file
{noformat}
The consequence is that, although the {{ADD JAR}} command doesn't fail 
immediately, the jar is actually not added properly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to