hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9817) FileSystem#globStatus and FileContext#globStatus need to work with symlinks
Date Mon, 05 Aug 2013 18:50:50 GMT

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

Colin Patrick McCabe commented on HADOOP-9817:
----------------------------------------------

So I gave creating subclasses a try, but I don't think it's the way to go here.  The code
was much longer due to the need to create explicit interfaces, and I also was not able to
make the abstract functions private in the superclass.  They had to be package-private, which
is more visibility than I wanted.  I added some better comments, and fixed the whitespace
and other issues you pointed out.  I'm not sure that empty string -> home directory merits
a comment, since it's how we handle things elsewhere.  Basically, the path '.' gets mapped
to a URI with an empty path, which then gets mapped to the current working directory (which
happens to be home in this case).  This is similar to how we treat all non-absolute paths,
as you can see in the unit tests.
                
> FileSystem#globStatus and FileContext#globStatus need to work with symlinks
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-9817
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9817
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.3.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HADOOP-9817.004.patch, HADOOP-9817.005.patch, HADOOP-9817.006.patch
>
>
> FileSystem#globStatus and FileContext#globStatus need to work with symlinks.  Currently,
they resolve all links, so that if you have:
> {code}
> /alpha/beta
> /alphaLink -> alpha
> {code}
> and you take {{globStatus(/alphaLink/*)}}, you will get {{/alpha/beta}}, rather than
the expected {{/alphaLink/beta}}.
> We even resolve terminal symlinks, which would prevent listing a symlink in FSShell,
for example.  Instead, we should build up the path incrementally.  This will allow the shell
to behave as expected, and also allow custom globbers to "see" the correct paths for symlinks.

--
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

Mime
View raw message