symious commented on code in PR #7927:
URL: https://github.com/apache/ozone/pull/7927#discussion_r1961226453
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeUsage.java:
##########
@@ -69,13 +69,11 @@ SpaceUsageSource realUsage() {
* <pre>
* {@code
* Calculate available space use method B.
- * |----used----| (avail) |++++++++reserved++++++++|
- * | fsAvail |-------other-------|
- * ->|~~~~|<-
- * remainingReserved
+ * |----used----| fsAvail |---other---|
+ * |----used----| (avail) |+++reserved+++|---other---|
* }
* </pre>
- * B) avail = fsAvail - Max(reserved - other, 0);
+ * B) avail = fsAvail - Max(reserved, 0);
Review Comment:
Updated, PTAL.
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestReservedVolumeSpace.java:
##########
@@ -95,15 +95,18 @@ public void testVolumeCapacityAfterReserve() throws
Exception {
HDDS_DATANODE_DIR_DU_RESERVED_PERCENT_DEFAULT);
long volumeCapacity = hddsVolume.getCurrentUsage().getCapacity();
+ long volumeAvailable = hddsVolume.getCurrentUsage().getAvailable();
Review Comment:
Updated, PTAL.
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/volume/TestReservedVolumeSpace.java:
##########
@@ -95,15 +95,18 @@ public void testVolumeCapacityAfterReserve() throws
Exception {
HDDS_DATANODE_DIR_DU_RESERVED_PERCENT_DEFAULT);
long volumeCapacity = hddsVolume.getCurrentUsage().getCapacity();
+ long volumeAvailable = hddsVolume.getCurrentUsage().getAvailable();
VolumeUsage usage = hddsVolume.getVolumeInfo().get().getUsageForTesting();
//Gets the actual total capacity
long totalCapacity = usage.realUsage().getCapacity();
+ long totalAvailable = usage.realUsage().getAvailable();
Review Comment:
Updated, PTAL.
--
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]