hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Mitic (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9364) PathData#expandAsGlob does not return correct results for absolute paths on Windows
Date Thu, 07 Mar 2013 01:05:12 GMT

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

Ivan Mitic commented on HADOOP-9364:

bq. Sorry I still don't see why the empty check and replacing the File constructor with Path
fixes it.
Hi Arpit, as I mentioned above,
new File("/dir1").isAbsolute() == false
"/dir" is an absolute path, and this is where the problem is. Path#isAbsolute does not have
this problem.

The empty check is just for the ".", quoting myself:
Additional problem I had to address is passing "." to PathData#expandAsGlob. Passing "." to
Path constructor will run it thru the URI normalization which will leave an empty string only.
Passing an empty string to new File("").isAbsolute() works fine and returns false, however,
new Path("").isAbsolute() throws.
> PathData#expandAsGlob does not return correct results for absolute paths on Windows
> -----------------------------------------------------------------------------------
>                 Key: HADOOP-9364
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9364
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 3.0.0, trunk-win
>            Reporter: Ivan Mitic
>            Assignee: Ivan Mitic
>         Attachments: HADOOP-9364.2.patch, HADOOP-9364.branch-trunk-win.pathdata.patch
> This causes {{FsShell ls}} not to work properly for absolute paths. For example:
> {code}
> -fs hdfs:// -ls -R /dir0
> {code}
> returns
> {code}
> drwxr-xr-x   - ivanmi supergroup          0 2013-03-05 11:15 ../../dir0/dir1
> {code}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message