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

Andrew Wang commented on HADOOP-9877:
-------------------------------------

Hi Binglin,

Patch looks good, nice catch! Two requests:

- Can you add a code comment explaining why we need this additional check? For 
example, "Some special filesystem directories (e.g. HDFS snapshot directories) 
are not returned by listStatus, but do exist if checked explicitly via 
getFileStatus."
- Need to fix Jenkins issues. It's fine to include a "list snapshots via shell" 
test in HDFS, especially because shell+snapshots seems to be a weak spot in our 
current unit tests.

+1 once these are addressed.

p.s. normally, patches are generated via a command like "git diff --no-prefix", 
I had to apply your patch with -p1 rather than -p0.
                
> 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
>
>
> {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