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

Daryn Sharp commented on HADOOP-9912:
-------------------------------------

Yes, it's becoming clear this is very complicated issue...  While I agree that 
from a purity perspective that returning the link status is arguably correct, 
in practice it's likely to break a lot of code if they try to use symlinks 
which will impede the use of symlinks.

The use case where user code cares if a path is symlink is probably nearly 
non-existent.  {{FsShell}} ls cares, but I question if it's reasonable to 
require additional overhead for the vast majority of use cases.  Ie. everyone 
that wants to do file/dir tests on directory contents will have to check 
{{isLink}}, issue another stat, and then re-test.

Jason and I spoke offline, and we have another proposal.  Return the resolved 
status if possible, else return the link status.  This makes sense for a 
dangling symlink because it's nothing but a symlink.  For the permission denied 
scenario, it's a bit more ambiguous but if the link target has path components 
after a no-permission path component because you again don't know what it is.
                
> 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

Reply via email to