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

Binglin Chang commented on HADOOP-9877:
---------------------------------------

Thanks for the review and advice, here is the new patch with test, changes:
1. Add some comments to explain the change.
2. Change getFileStatus to getFileLinkStatus
3. Add unquotePathComponent to fix test failure of org.apache.hadoop.fs.TestPath
4. Add test in hdfs to check .snapshot can be correctly globbed.

@Colin
I tried .reserved but it can not work currently, because:
getFileStatus("/.reserved") failed
getFileStatus("/.reserved/.inodes") failed
getFileStatus("/.reserved/.inodes/[id]") success
This behavior is not consistent with /.snapshot, I you agree, I can fire a bug 
to fix this.


 

                
> hadoop fsshell can not ls .snapshot dir after HADOOP-9817
> ---------------------------------------------------------
>
>                 Key: HADOOP-9877
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9877
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 2.1.0-beta
>            Reporter: Binglin Chang
>            Assignee: Binglin Chang
>         Attachments: HADOOP-9877.v1.patch, HADOOP-9877.v2.patch
>
>
> {code}
> decster:~/hadoop> bin/hadoop fs -ls "/foo/.snapshot"
> 13/08/16 01:17:22 INFO hdfs.DFSClient: +++++ listPath(/)
> 13/08/16 01:17:22 INFO hdfs.DFSClient: +++++ listPath(/foo)
> ls: `/foo/.snapshot': No such file or directory
> {code}
> HADOOP-9817 refactor some globStatus code, but forgot to handle special case 
> that .snapshot dir is not show up in listStatus but exists, so we need to 
> explicitly check path existence using getFileStatus, rather than depending on 
> listStatus results.

--
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