hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kousuke Saruta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9817) FileSystem#globStatus and FileContext#globStatus need to work with symlinks
Date Thu, 01 Aug 2013 23:05:51 GMT

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

Kousuke Saruta commented on HADOOP-9817:

Thank you for providing the patch, Colin!
I tried to apply your patch and met following 2 problems.

1. can not delete the link itself after deleting target.
When a path "/a/b" and "/a/link -> /a/b" exists, and then delete "/a/b", we can not delete
Before deleting "/a/b", I could delete "/a/link"

2. dfs -ls /symlink/ wouldn't list the entries.
I think dfs -ls behaves like unix's ls -l. If so, when "/a/symlink" is a symlink related to
"/a/b" which is a directory, "dfs -ls /a/symlink/" ( ends with slash ) should show the entries
included in "/a/b".

Perhaps, those problems are related to this jira, directly.
#1 may be related to HDFS-5021.
Are there any proper jira for #2 ?
If there are no jira for #2, I will create.

> 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

View raw message