[
https://issues.apache.org/jira/browse/HADOOP-1891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530271
]
Doug Cutting commented on HADOOP-1891:
--------------------------------------
> There's a lot of string manipulation and special-casing in Path, particularly
> for Windows filesystems. Pushing that out to the FS seems like a reasonable
> abstraction.
One problem is that there's lots of code that passes things returned by
File#getPath() to 'new Path(String)', and Windows file names are invalid URI
paths. When we added Path.java to Hadoop we needed to do so back compatibly,
since lots of user code manipulates file names and we didn't want to break it.
To avoid processing Windows-specifics in Path.java and stay compatible, we'd
need to either avoid creating URIs in a Path at all, or we'd have to escape
backslashes and colons in the URI's path, and have FileSystem implementations
remove those escapes. Perhaps that would work, although it might be hard to
make it back-compatible with existing code.
I've pulled a lot of my hair out in the process of getting Path to work on
Windows and am personally reluctant to revisit this. But feel free to
experiment and see if you can find a cleaner approach.
> "." 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
> Assignee: Chris Douglas
>
> 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.