hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Lowe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9912) globStatus of a symlink to a directory does not report symlink as a directory
Date Thu, 19 Sep 2013 16:20:52 GMT

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

Jason Lowe commented on HADOOP-9912:
------------------------------------

Thanks [~eli] for the excellent writeup and thanks [~cmccabe] for proposing a design of new
APIs.

Regarding the issue of what to do with the existing APIs, I had an offline discussion with
[~daryn], [~kihwal], and [~nroberts].  At this point we think the best choice for the existing
listStatus API is to follow symlinks when it can but throw an exception when it cannot.  It's
a conservative approach where we're basically saying we have no idea how the caller will react
if it sees the raw symlink since it never exposed one in previous versions.  Therefore we
aren't assuming it will end well if we start exposing symlinks in the results and change the
previously-assumed semantics of isDir() on those results.

Yes, this does mean that "bad" symlinks (dangling, pointing within a protected directory tree,
referencing another filesystem that is currently unavailable) could cause programs to blow
up when they encounter them in a directory.  However we think that is preferable to the possible
alternative of silently missing data because the app misinterpreted the raw symlink and skipped
it when it should have caused an error.  Ideally the existing globStatus API would use a symlink-aware
listStatus API internally so it could avoid erroring-out on symlinks that would be filtered
out by the specified pattern/filter.
                
> 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.1.0-beta
>            Reporter: Jason Lowe
>            Priority: Blocker
>         Attachments: HADOOP-9912-testcase.patch, new-hdfs.txt, new-local.txt, old-hdfs.txt,
old-local.txt
>
>
> 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

Mime
View raw message