adoroszlai commented on code in PR #7927:
URL: https://github.com/apache/ozone/pull/7927#discussion_r1961200236


##########
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:
   Similarly here, please assign `usage.realUsage()` to variable.



##########
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:
   Please get usage once:
   
   ```java
       SpaceUsageSource currentUsage = hddsVolume.getCurrentUsage();
       long volumeCapacity = currentUsage.getCapacity();
       long volumeAvailable = currentUsage.getAvailable();
   ```
   
   (needs import, so not adding as github suggestion)



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