hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kannan Rajah (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11982) Inconsistency in handling URI without authority
Date Tue, 26 May 2015 18:28:17 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-11982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14559562#comment-14559562
] 

Kannan Rajah commented on HADOOP-11982:
---------------------------------------

Does anyone have a comment on this issue? Is it OK to create a patch that defaults to empty
authority?

> Inconsistency in handling URI without authority
> -----------------------------------------------
>
>                 Key: HADOOP-11982
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11982
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 2.7.0
>            Reporter: Kannan Rajah
>            Assignee: Kannan Rajah
>
> There are some inconsistencies coming from Hadoop class Path.java. This seems to be the
behavior for a very long time. I am not sure about the implications of correcting it, so want
to get some opinion.
> When you use makeQualified, a NULL authority is converted into empty authority. When
authority is NULL, the toString will not contain the // before the actual absolute path. Otherwise
it will not. There are ecosystem components that may or may not use makeQualified consistently.
We have hit cases where the Path.toString() is used as key in hashmap. So lookups start failing
when the entry has Path object constructed using makeQualified and lookup key does not.
> Proposal: Can we default to empty authority always when its NULL?
> -------------------------------------------------------------------------------------
> Examples
> ---------------
> Path p = new Path("hdfs:/a/b/c")
> p.toString() -> hdfs:/a/b/c              -> There is a single slash
> p.makeQualified(fs);
> p/toString() -> hdfs:///a/b/c            -> There are 3 slashes
> -------------------------------------------------------------------------------------



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

Mime
View raw message