You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2021/08/26 12:53:25 UTC

[GitHub] [hadoop] ayushtkn commented on a change in pull request #3338: HADOOP-17870 Make Http Filesystem allow non-absolute uri based paths.

ayushtkn commented on a change in pull request #3338:
URL: https://github.com/apache/hadoop/pull/3338#discussion_r696599410



##########
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:
       Any specific reason for passing `null` here, we could have used `this.getWorkingDirectory()` else it throws a `NPE` in case of non absolute path.
   




-- 
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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org