You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/10/18 15:39:27 UTC

[GitHub] [ozone] sodonnel commented on a diff in pull request #3781: HDDS-2642. Expose decommission / maintenance metrics via JMX

sodonnel commented on code in PR #3781:
URL: https://github.com/apache/ozone/pull/3781#discussion_r998408719


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/DatanodeAdminMonitorImpl.java:
##########
@@ -82,6 +85,44 @@ public class DatanodeAdminMonitorImpl implements DatanodeAdminMonitor {
   private long unhealthyContainers = 0;
   private long underReplicatedContainers = 0;
 
+  @SuppressFBWarnings(value = "SIC_INNER_SHOULD_BE_STATIC")
+  private final class ContainerStateInWorkflow {

Review Comment:
   Rather than suppress the FB warning, can this class be made `private final static class ...`?  I am not an expert in this area, but usually inner classes I've seen are static. The difference between static and non static inner classes seems to be that "non static" inner classes can directly access the enclosing classes instance variables and methods.
   
   A static inner class cannot directly access the enclosing classes methods. It has to do it via an object reference.
   
   In this case, the inner class is a simple wrapper around a set of variables and does not need to access the enclosing methods class, and therefore can be static I think.



-- 
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-unsubscribe@ozone.apache.org

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


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