[ 
https://issues.apache.org/jira/browse/HADOOP-17870?focusedWorklogId=642330&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-642330
 ]

ASF GitHub Bot logged work on HADOOP-17870:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Aug/21 13:26
            Start Date: 26/Aug/21 13:26
    Worklog Time Spent: 10m 
      Work Description: yellowflash commented on a change in pull request #3338:
URL: https://github.com/apache/hadoop/pull/3338#discussion_r696628021



##########
File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/http/AbstractHttpFileSystem.java
##########
@@ -60,7 +60,7 @@ public URI getUri() {
 
   @Override
   public FSDataInputStream open(Path path, int bufferSize) throws IOException {
-    URLConnection conn = path.toUri().toURL().openConnection();
+    URLConnection conn = path.makeQualified(this.getUri(), 
null).toUri().toURL().openConnection();

Review comment:
       Yes you are correct. Fixed it by using `makeQualified(Path path)` which 
is overridden by the Filesystem the way you mentioned.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 642330)
    Time Spent: 1h  (was: 50m)

> HTTP Filesystem dont take Path's with no scheme/authority
> ---------------------------------------------------------
>
>                 Key: HADOOP-17870
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17870
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 3.3.1
>            Reporter: VinothKumar Raman
>            Assignee: VinothKumar Raman
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> HTTP filesystem is inconsistent with other filesystem (eg: S3AFilesystem) in 
> that they don't accept Path which is relative to the URL that the filesystem 
> is instantiated with.
>  
> As in
> {code:java}
> FileSystem.get("http://www.example.com";).open(new Path("/test")){code}
> will fail with URI not absolute. But it should infact fetch 
> {{http://www.example.com/test}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to