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

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

Thanks Andrew for the explanation and proposal. I can give some additional 
inputs, hope that helps: 
 
bq. why did the behavior of globStatus and symlinks change with HADOOP-9877 
which appears to be a snapshot-related JIRA.

The reason is listStatus can't get hidden directory, so 
getFileStatus/getFileLinkStatus needs to be added to get hidden directory 
status. Before this change only listStatus is used in globStatus, so there were 
not any consistency issue within same FS, but after adding 
getFileStatus/getFileLinkStatus, problem occurs. 

Basically, the existence of hidden directory require usage of 
getFileStatus/getFileLinkStatus, the requirement of wildcards require usage of 
listStatus, but:
In RLFS, listStatus resolve symlink
In HDFS, listStatus doesn't resolve symlink
If we only use one API, we don't have inconsistency issue within one FS, but 
have inconsistency issue across FS, so before HADOOP-9877 problem exists but 
not so serious, after HADOOP-9877, I break consistency within RLFS in order to 
remain consistency in HDFS... Sorry for not realizing this problem earlier.

@[~andrew.wang]:
About the proposal, I think it is better to leave listStatus compatible(both 
HDFS and RLFS, for cross FS symlink), and add new listLinkStatus API, I guess 
symlink support(both RLFS and HDFS) does not have wild adoption currently, add 
new feature in new API makes sense.



                
> 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