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

Binglin Chang commented on HADOOP-9912:
---------------------------------------

After analyze the code, here is what happens:

1. The intended behavior of Globber.glob (which calls listStatus) is to return 
symlink rather than symlink target I believe. glob and listStatus for HDFS 
follows this rule, so glob and listStatus for RawLocalFileSystem should follow 
this rule as well, but because java lacks symlink support, listStatus for 
RawLocalFileSystem will list symlink targets (o.a.h.fs.Stat only fix 
getFileStatus & getFileLinkStatus, not listStatus). 

2. I guess for a long time, pig is using this behavior(listStatus return 
symlink target rather than symlink), I am afraid this behavior is wrong and is 
inconsistent with HDFS. I guess we can only choose: remain old behavior(then 
listStatus behavior is inconsistent across FileSystem), or adopt new behavior, 
or perhaps and new interface: listLinkStatus vs listStatus...

3. About test success on mac, it is because o.a.h.fs.Stat currently don't 
support Mac, and old implementation doesn't support symlink very well.

 
                
> 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