You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Kannan Rajah (JIRA)" <ji...@apache.org> on 2015/05/16 00:19:00 UTC
[jira] [Created] (HADOOP-11982) Inconsistency in handling URI
without authority
Kannan Rajah created HADOOP-11982:
-------------------------------------
Summary: 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)