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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java:
##########
@@ -131,9 +131,11 @@ private HddsVolume(Builder b) throws IOException {
       this.volumeInfoMetrics =
           new VolumeInfoMetrics(b.getVolumeRootStr(), this);
 
-      LOG.info("Creating HddsVolume: {} of storage type : {} capacity : {}",
-          getStorageDir(), b.getStorageType(),
-              getVolumeInfo().get().getCapacity());
+      LOG.info("Creating HddsVolume: {} of storage type: {}, capacity: {}, 
available: {}",
+          getStorageDir(),
+          b.getStorageType(),
+          getVolumeInfo().get().getCapacity(),
+          getVolumeInfo().get().getAvailable());

Review Comment:
   I would like to suggest:
   
   1. implement `toString` in `SpaceUsageSource.Fixed` like:
   ```java
       @Override
       public String toString() {
         return "capacity=" + capacity +
             "used=" + used +
             "available=" + available;
       }
   ```
   2. log usage in `HddsVolume` as:
   ```suggestion
         LOG.info("Creating HddsVolume: {} of storage type: {}, {}",
             getStorageDir(),
             b.getStorageType(),
             getCurrentUsage());
   ```



-- 
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: issues-unsubscr...@ozone.apache.org

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


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

Reply via email to