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

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

[~jingzhao],

Tried querying {{ContentSummary}} for the Directory which has snapshots, and 
still I don't see ContentSummary's {{SnpashotDirectoryCount}} reflecting any 
snapshots taken. Is there any other way of querying the ContentSummary which 
will reflect the right Snap Dir Count ? Please clarify.

Output from attached test v002.
{noformat}
ContentSummary: /foo - Dir: 2, SnapDir: 0, SnapFile: 0
ContentSummary: /foo/bar - Dir: 1, SnapDir: 0, SnapFile: 0
Count /foo -         none             inf            none             inf       
     2            0                  0 /foo
Created Snaphot: /foo/.snapshot/s1
Created Snaphot: /foo/.snapshot/s2
Count /foo -         none             inf            none             inf       
     2            0                  0 /foo
ContentSummary: /foo - Dir: 2, SnapDir: 0, SnapFile: 0
ContentSummary: /foo/bar - Dir: 1, SnapDir: 0, SnapFile: 0
ContentSummary: /foo/.snapshot/s1 - Dir: 2, SnapDir: 0, SnapFile: 0
ContentSummary: /foo/.snapshot/s2 - Dir: 2, SnapDir: 0, SnapFile: 0
{noformat}

> 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
>              Labels: incompatible
>             Fix For: 2.8.0, 3.0.0-alpha1
>
>         Attachments: HDFS-9063.000.patch, test.001.patch, test.002.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.
> In the meanwhile, the snapshot diff list size is no longer included in the 
> computation result. This can bring minor incompatibility but is consistent 
> with the change in HDFS-7728.



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