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 Thu, 01 Aug 2013 21:51:49 GMT

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

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

I agree, Kousuke: we don't want to eliminate the resolve the symlink when it is on the end
of the path.  Since this is used in the shell, I think we also want to preserve symlinks that
are interior to the path.  For example when doing {{hadoop fs -ls /a/b}}, it would be nice
to get back an entry like {{/a/b}}, even when {{/a}} or {{/a/b}} are symlinks.

This patch implements that.  I also unified the {{globStatus}} implementations, which were
formerly separate between {{FileContext}} and {{FileSystem}}
                
> 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
>
>
> 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