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

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.7.0
    • namenode
    • None
    • Reviewed

    Description

      This is a follow up based on comment from jingzhao 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.04.patch
          18 kB
          Jing Zhao
        2. HDFS-7811.03.patch
          18 kB
          Jing Zhao
        3. HDFS-7811.02.patch
          18 kB
          Jing Zhao
        4. HDFS-7811.01.patch
          15 kB
          Xiaoyu Yao
        5. HDFS-7811.00.patch
          14 kB
          Xiaoyu Yao

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: