[ 
https://issues.apache.org/jira/browse/HDFS-9063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Manoj Govindassamy updated HDFS-9063:
-------------------------------------
    Attachment: test.001.patch

[~jingzhao],

Attached a test case which shows the change in behavior after HDFS-9063 fix.  

Test does the following:
1. Count dirs, files in a directory /foo
2. Allow and take snapshot of the directory /foo
3. Count dirs, files of the same directory /foo for which snapshot was taken
4. Verify the new_dir_count == 1 + old_dir_count. Because, it should now 
include {{.snapshot}} directory. This verification fails after HDFS-9063 fix. 

Let me know your thoughts on the test and the expected behavior.

> Correctly handle snapshot path for getContentSummary
> ----------------------------------------------------
>
>                 Key: HDFS-9063
>                 URL: https://issues.apache.org/jira/browse/HDFS-9063
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: namenode
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>             Fix For: 2.8.0, 3.0.0-alpha1
>
>         Attachments: HDFS-9063.000.patch, test.001.patch
>
>
> The current getContentSummary implementation does not take into account the 
> snapshot path, thus if we have the following ops:
> 1. create dirs /foo/bar
> 2. take snapshot s1 on /foo
> 3. create a 1 byte file /foo/bar/baz
> then "du /foo" and "du /foo/.snapshot/s1" can report same results for "bar", 
> which is incorrect since the 1 byte file is not included in snapshot s1.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to