Simon0806 commented on a change in pull request #1041:
URL: https://github.com/apache/hadoop-ozone/pull/1041#discussion_r441407487



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/OzoneQuota.java
##########
@@ -25,26 +25,75 @@
  * represents an OzoneQuota Object that can be applied to
  * a storage volume.
  */
-public class OzoneQuota {
+public final class OzoneQuota {
 
   public static final String OZONE_QUOTA_BYTES = "BYTES";
+  public static final String OZONE_QUOTA_KB = "KB";
   public static final String OZONE_QUOTA_MB = "MB";
   public static final String OZONE_QUOTA_GB = "GB";
   public static final String OZONE_QUOTA_TB = "TB";
 
-  private Units unit;
-  private long size;
-
   /** Quota Units.*/
   public enum Units {UNDEFINED, BYTES, KB, MB, GB, TB}
 
+  // Quota to decide how many buckets or keys can be created.
+  private long namespaceQuota;
+  // Quota to decide how many storage space will be used in bytes.
+  private long storagespaceQuota;
+  private RawStorageSpaceQuota rawStoragespaceQuota;
+
+  private static class RawStorageSpaceQuota {
+    private Units unit;
+    private long size;
+
+    RawStorageSpaceQuota(Units unit, long size) {
+      this.unit = unit;
+      this.size = size;
+    }
+
+    public Units getUnit() {
+      return unit;
+    }
+
+    public long getSize() {
+      return size;
+    }
+
+    /**
+     * Returns size in Bytes or -1 if there is no Quota.
+     */
+    public long sizeInBytes() {

Review comment:
       OK, I will review OzoneConsts again and see what can be used.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to