[
https://issues.apache.org/jira/browse/HADOOP-9912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13754180#comment-13754180
]
Andrew Wang commented on HADOOP-9912:
-------------------------------------
Daryn, Jason, thanks for the input:
bq. I need to look at this further but if DFS.listStatus isn't resolving, then
we've got to think hard about the semantics of symlinks. 99% of the time, the
user expects a symlink to be transparent.
bq. Aren't there separate calls if one wants to know the true details of a link
rather than what the link references?
If you look at {{readdir}} as an example, it does not automatically dereference
by default. Neither does {{ls}}, unless you use the {{-L}} flag on Linux. I
think that's the expected default behavior, showing the actual contents of the
directory. It's possible to build a directory walking program via the current
{{listStatus}}, it just requires dereferencing any links to see if the target
is a directory. This appears to be what {{ls -R}} does.
I think my proposal to fix RLFS still makes sense (let RLFS be inconsistent and
compatible), and then we can think about adding a {{ls -L}} style convenience
flag or a new call for auto-deref of listing and glob results.
> globStatus of a symlink to a directory does not report symlink as a directory
> -----------------------------------------------------------------------------
>
> Key: HADOOP-9912
> URL: https://issues.apache.org/jira/browse/HADOOP-9912
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs
> Affects Versions: 2.3.0
> Reporter: Jason Lowe
> Priority: Blocker
> Attachments: HADOOP-9912-testcase.patch
>
>
> globStatus for a path that is a symlink to a directory used to report the
> resulting FileStatus as a directory but recently this has changed.
--
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