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

Chris Douglas commented on HADOOP-1891:
---------------------------------------

I'm uncertain of the correct behavior, here. Absent a filesystem- or a 
configuration to determine the default filesystem- there's no "working 
directory" to resolve. Regrettably, this:

{noformat}
Configuration conf = new Configuration();
Path cwd = new Path(".");
Path kid1 = new Path(parent, "blah");
Path kid2 = new Path(FileSystem.get(conf).getWorkingDirectory(), "blah");
// kid1: blah
// kid2: /home/user/blah
{noformat}

is neither intuitive nor succinct. Paths are evaluated at construction and 
segments matching dot are summarily excised as part of URI normalization. Since 
this fails to do what one would reasonably expect with "." as a path, would it 
make sense to throw in this case? Certainly, Path doesn't have enough 
information to do much else.

> "." is converted to an empty path
> ---------------------------------
>
>                 Key: HADOOP-1891
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1891
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.14.1
>         Environment: Linux
>            Reporter: Olga Natkovich
>
> Path p = new Path(".");
> System.out.println("path=(" + p.toString() +")");
>  path =()

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to