Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-7584 Enable Quota Support for Storage Types
  3. HDFS-7811

Avoid recursive call getStoragePolicyID in INodeFile#computeQuotaUsage

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      This is a follow up based on comment from Jing Zhao on HDFS-7723.

      I just noticed that INodeFile#computeQuotaUsage calls getStoragePolicyID to identify the storage policy id of the file. This may not be very efficient (especially when we're computing the quota usage of a directory) because getStoragePolicyID may recursively check the ancestral INode's storage policy. I think here an improvement can be passing the lowest parent directory's storage policy down while traversing the tree.

        Attachments

        1. HDFS-7811.00.patch
          14 kB
          Xiaoyu Yao
        2. HDFS-7811.01.patch
          15 kB
          Xiaoyu Yao
        3. HDFS-7811.02.patch
          18 kB
          Jing Zhao
        4. HDFS-7811.03.patch
          18 kB
          Jing Zhao
        5. HDFS-7811.04.patch
          18 kB
          Jing Zhao

          Issue Links

            Activity

              People

              • Assignee:
                xyao Xiaoyu Yao
                Reporter:
                xyao Xiaoyu Yao
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: