Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-541

Ozone Quota support.

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      Create a volume with just 1 MB as quota

      [root@ctr-e138-1518143905142-481027-01-000002 bin]# ./ozone sh volume create --quota=1MB --user=root /hive
      2018-09-23 02:10:11,283 [main] INFO - Creating Volume: hive, with root as owner and quota set to 1048576 bytes.
      

      Now create a bucket and put a big key greater than 1MB in the bucket

      [root@ctr-e138-1518143905142-481027-01-000002 bin]# ./ozone sh bucket create /hive/bucket1
      2018-09-23 02:10:38,003 [main] INFO - Creating Bucket: hive/bucket1, with Versioning false and Storage Type set to DISK
      [root@ctr-e138-1518143905142-481027-01-000002 bin]# ls -l ../../ozone-0.3.0-SNAPSHOT.tar.gz
      -rw-r--r-- 1 root root 165903437 Sep 21 13:16 ../../ozone-0.3.0-SNAPSHOT.tar.gz
      [root@ctr-e138-1518143905142-481027-01-000002 bin]# ./ozone sh key put /hive/ozone-0.3.0-SNAPSHOT.tar.gz ../../ozone-0.3.0-SNAPSHOT.tar.gz
      volume/bucket/key name required in putKey
      [root@ctr-e138-1518143905142-481027-01-000002 bin]# ./ozone sh key put /hive/bucket1/ozone-0.3.0-SNAPSHOT.tar.gz ../../ozone-0.3.0-SNAPSHOT.tar.gz
      [root@ctr-e138-1518143905142-481027-01-000002 bin]# ./ozone sh key info /hive/bucket1/ozone-0.3.0-SNAPSHOT.tar.gz
      {
      "version" : 0,
      "md5hash" : null,
      "createdOn" : "Sun, 23 Sep 2018 02:13:02 GMT",
      "modifiedOn" : "Sun, 23 Sep 2018 02:13:08 GMT",
      "size" : 165903437,
      "keyName" : "ozone-0.3.0-SNAPSHOT.tar.gz",
      "keyLocations" : [ {
      "containerID" : 2,
      "localID" : 100772661343420416,
      "length" : 134217728,
      "offset" : 0
      }, {
      "containerID" : 3,
      "localID" : 100772661661007873,
      "length" : 31685709,
      "offset" : 0
      } ]
      }

      It was able to put a 165 MB file on a volume with just 1MB quota.

       

      Currently Ozone haven't support Quota, So I think this should be a new feature .
      The design document can be referred to the attachment. (design google docs)

      Attachments

        Issue Links

          1.
          Ozone sh volume client support quota option. Sub-task Resolved mingchao zhao

          100%

          Original Estimate - Not Specified Original Estimate - Not Specified
          Time Spent - 49h
          2.
          Volume space: add quotaUsageInBytes and update it when create and delete key Sub-task Resolved mingchao zhao  
          3.
          Add protobuf field to support quota. Sub-task Closed Simon Su  
          4.
          Volume space: check quotaUsageInBytes when write key Sub-task Resolved mingchao zhao  
          5.
          Ozone sh bucket client support quota option. Sub-task Resolved mingchao zhao  
          6.
          Bucket space: Supports clearing spaceQuota Sub-task Resolved mingchao zhao  
          7.
          Volume space: Supports clearing spaceQuota Sub-task Resolved mingchao zhao  
          8.
          Bucket space: add usedBytes and update it when create and delete key Sub-task Resolved mingchao zhao  
          9.
          Bucket space: check quotaUsageInBytes when write key Sub-task Resolved mingchao zhao  
          10.
          Space Quota: bucket quota not exceeded, volume needn’t check. Sub-task Resolved mingchao zhao  
          11.
          Support Namespace Level quota for Volume Sub-task Resolved Rui Wang  
          12.
          Support Namespace Level quota for bucket Sub-task Resolved Rui Wang  
          13.
          add storage space quota doc Sub-task Resolved mingchao zhao  
          14.
          The usage value needs to be adjusted after client crash Sub-task Resolved Sumit Agrawal  
          15.
          support quota on key prefix Sub-task Open Unassigned  
          16.
          Refactor OzoneQuota to make it easy to support more quota type Sub-task Resolved YI-CHEN WANG  
          17.
          Volume namespace: add namespaceQuotaUsage and update it when create and delete bucket Sub-task Resolved Rui Wang  
          18.
          Volume Namespace:`usedNamespace` works by `ozone sh vol info` Sub-task Resolved Sumit Agrawal  
          19.
          Volume Namespace: check usedNamespace when create bucket Sub-task Resolved Rui Wang  
          20.
          Volume Namespace: support clear namespace quota Sub-task Resolved Rui Wang  
          21.
          Bucket Namespace: add namespaceQuotaUsage and update it when create and delete key in a bucket Sub-task Resolved Rui Wang  
          22.
          Bucket Namespace: check usedNamespace when create key in bucket Sub-task Resolved Rui Wang  
          23.
          Bucket Namespace: support clear namespace quota Sub-task Resolved Rui Wang  
          24.
          CLI flag --quota should default to 'spaceQuota' to preserve backward compatibility. Sub-task Resolved Ayush Saxena  
          25.
          Old bucket needs to be accessible after the cluster was upgraded to the Quota version. Sub-task Resolved mingchao zhao  
          26.
          Update QUOTA_IN_COUNTS to quota in namespace Sub-task Resolved Rui Wang  
          27.
          If volume's quota is enabled then bucket's quota cannot be cleared Sub-task Resolved mingchao zhao  
          28.
          Add namespace quota to documentation Sub-task Resolved Rui Wang  
          29.
          Handle illegalArgumentException in Volume/Bucket Quota requests Sub-task Resolved Bharat Viswanadham  
          30.
          Should remove allocated quota when open key are cleaned up Sub-task Resolved Rui Wang  
          31.
          Update CountQuota to NamesapceQuota Sub-task Resolved Rui Wang  
          32.
          Fixed client set quota with 0 Sub-task Resolved mingchao zhao  
          33.
          Fix when update quota the usedBytes and namespace will become to 0 Sub-task Resolved mingchao zhao  
          34.
          Add warning log when old volume and bucket set quota Sub-task Resolved mingchao zhao  
          35.
          OzoneQuota change BYTES to B Sub-task Resolved mingchao zhao  
          36.
          Allow Default Space Quota Unit as Bytes Sub-task Resolved Rui Wang  
          37.
          Update usedBytes only when commit key. Sub-task Resolved mingchao zhao  
          38.
          S3MultipartUpload support update bucket usedNamespace. Sub-task Resolved Sumit Agrawal  

          Activity

            People

              micahzhao mingchao zhao
              nmaheshwari Namit Maheshwari
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Time Spent - 145h Remaining Estimate - 120h
                  120h
                  Logged:
                  Time Spent - 145h Remaining Estimate - 120h
                  145h