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

Quota counts missed between clear quota and set quota

    XMLWordPrintableJSON

Details

    • Reviewed
    • hdfs quota

    Description

      HDFS Quota counts will be missed between a clear quota operation and a set quota.

      When setting quota for a dir, the INodeDirectory will be replaced by INodeDirectoryWithQuota and dir.isQuotaSet() becomes true. When INodeDirectoryWithQuota is newly created, quota counting will be performed. However, when clearing quota, the quota conf is set to -1 and dir.isQuotaSet() becomes false while INodeDirectoryWithQuota will NOT be replaced back to INodeDirectory.

      FSDirectory.updateCount just update the quota count for inodes that isQuotaSet() is true. So after clear quota for a dir, its quota counts will not be updated and it's reasonable. But when re seting quota for this dir, quota counting will not be performed and some counts will be missed.

      Attachments

        1. HDFS-1189-for_20.204.patch
          4 kB
          John George
        2. HDFS-1189-for_20.204.patch
          4 kB
          John George
        3. hdfs-1189-1.patch
          4 kB
          John George
        4. HDFS-1189.patch
          4 kB
          John George
        5. HDFS-1189.patch
          4 kB
          John George
        6. HDFS-1189.patch
          1 kB
          Kang Xiao

        Issue Links

          Activity

            People

              johnvijoe John George
              xiaokang Kang Xiao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: