Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 596E3200B8D for ; Fri, 23 Sep 2016 21:30:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 58232160ACF; Fri, 23 Sep 2016 19:30:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 07568160AD6 for ; Fri, 23 Sep 2016 21:30:21 +0200 (CEST) Received: (qmail 27972 invoked by uid 500); 23 Sep 2016 19:30:21 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 27957 invoked by uid 99); 23 Sep 2016 19:30:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2016 19:30:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C57672C0B13 for ; Fri, 23 Sep 2016 19:30:20 +0000 (UTC) Date: Fri, 23 Sep 2016 19:30:20 +0000 (UTC) From: "Xiao Chen (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-9063) Correctly handle snapshot path for getContentSummary MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 23 Sep 2016 19:30:23 -0000 [ https://issues.apache.org/jira/browse/HDFS-9063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15517352#comment-15517352 ] Xiao Chen commented on HDFS-9063: --------------------------------- Hm, I'm a little confused by this comment: bq. I.e., since we already have a number in the content summary to indicate the total number of snapshots, the number of snapshots is no longer added into the directory number. [~jingzhao], could you clarify? I have just chatted offline with Manoj. The snapshotXXXX in {{ContentSummary}}, added by HDFS-8986, was to track how many files/directories are created under a snapshot, so that {{count -x}} could exclude them and calculate a result of direct usage. It is *not* tracking how many snapshots have been taken on a directory. Do we have number of snapshots visible to users? I only found {{SnapshotManager#snapshotCounter}} at the hdfs level, and {{DirectorySnapshottableFeature#getNumSnapshots}} at the dir level - neither seems to be propagating to any shell commands. My 2 cents are this is will not reasonably impact quotas, so maybe good as-is. Nice to have this displayed too, if users want to get it absolutely accurate. Please share your thoughts, thanks! > 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-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org