siddhantsangwan commented on code in PR #9646:
URL: https://github.com/apache/ozone/pull/9646#discussion_r2730686896


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/VolumeInfoMetrics.java:
##########
@@ -44,15 +44,21 @@ public class VolumeInfoMetrics implements MetricsSource {
       VolumeInfoMetrics.class.getSimpleName();
 
   private static final MetricsInfo CAPACITY =
-      Interns.info("Capacity", "Capacity");
+      Interns.info("OzoneCapacity", "Ozone usable capacity (after reserved 
space adjustment)");

Review Comment:
   Generally, we have annotations in the code to mark the stability and 
intended audience of an interface. See `InterfaceAudience.java` and 
`InterfaceStability.java`. For example, `SCMNodeMetrics` is marked as 
`@InterfaceAudience.Private` which means it's `Unstable` as per the 
documentation in:
   ```
   Classes that are {@link InterfaceAudience.Private} are to be considered 
unstable 
   ```
   
   ```
     /**
      * No guarantee is provided as to reliability or stability across any
      * level of release granularity.
      */
     @Documented
     @Retention(RetentionPolicy.RUNTIME)
     public @interface Unstable {
     }
   ```
   
   I considered this when making this change. The options were:
   1. To not change the existing names at all and only introduce new terms 
Filesystem Capacity etc. This wouldn't have solved the confusion.
   2. To keep both - the existing terms capacity, available and scmUsed and 
also introduce ozoneCapacity, ozoneAvailable, ozoneUsed. This would have caused 
more confusion.
   3. Change the existing names and introduce fs stats, which is what I did in 
this PR.
   
   Moreover, I think this change is required for correctness - see 
https://issues.apache.org/jira/browse/HDDS-14388. Currently even ozone devs 
find it hard to understand these stats and have to spend a non trivial amount 
of time to figure them out. Overall, I think we should try to make them clear 
across the ozone code.



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