priyeshkaratha commented on code in PR #10105:
URL: https://github.com/apache/ozone/pull/10105#discussion_r3153108701


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/QuotaUtil.java:
##########
@@ -66,6 +66,24 @@ public static long getReplicatedSize(
     }
   }
 
+  /**
+   * Calculate the physical bytes stored on a single DataNode for one block.
+   * For RATIS each DN holds a full copy, so the per-replica size equals the
+   * logical block size. For EC each DN holds one chunk per stripe, so the
+   * per-replica size is {@code replicatedSize / requiredNodes}.
+   *
+   * @param dataSize  logical (unreplicated) block size in bytes
+   * @param repConfig replication configuration
+   * @return bytes stored on a single DN for this block
+   */
+  public static long getSizePerReplica(long dataSize, ReplicationConfig 
repConfig) {
+    int requiredNodes = repConfig.getRequiredNodes();

Review Comment:
   Addressed the changes.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to