Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9063

Correctly handle snapshot path for getContentSummary

    Details

    • Target Version/s:
    • Hadoop Flags:
      Incompatible change, Reviewed
    • Release Note:
      Hide
      The jira made the following changes:
      1. Fix a bug to exclude newly-created files from quota usage calculation for a snapshot path.
      2. Number of snapshots is no longer counted as directory number in getContentSummary result.
      Show
      The jira made the following changes: 1. Fix a bug to exclude newly-created files from quota usage calculation for a snapshot path. 2. Number of snapshots is no longer counted as directory number in getContentSummary result.

      Description

      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.

        Attachments

        1. HDFS-9063.000.patch
          19 kB
          Jing Zhao
        2. test.001.patch
          3 kB
          Manoj Govindassamy
        3. test.002.patch
          4 kB
          Manoj Govindassamy

          Activity

            People

            • Assignee:
              jingzhao Jing Zhao
              Reporter:
              jingzhao Jing Zhao
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: