Tejaskriya commented on code in PR #7522:
URL: https://github.com/apache/ozone/pull/7522#discussion_r1883536775


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/block/ScmBlockDeletingServiceMetrics.java:
##########
@@ -86,10 +99,14 @@ public final class ScmBlockDeletingServiceMetrics {
   @Metric(about = "The number of dataNodes of delete transactions.")
   private MutableGaugeLong numBlockDeletionTransactionDataNodes;
 
+  private final Map<UUID, DatanodeCommandCounts> numCommandsDatanode;
+
   private ScmBlockDeletingServiceMetrics() {
+    this.registry = new MetricsRegistry(SOURCE_NAME);

Review Comment:
   If we remove it we get this error:
   ```
   org.apache.hadoop.metrics2.MetricsException: Hybrid metrics: registry 
required.
        at 
org.apache.hadoop.metrics2.lib.MetricsSourceBuilder.build(MetricsSourceBuilder.java:79)
        at 
org.apache.hadoop.metrics2.impl.MetricsSystemImpl.register(MetricsSystemImpl.java:224)
        at 
org.apache.hadoop.hdds.scm.block.ScmBlockDeletingServiceMetrics.create(ScmBlockDeletingServiceMetrics.java:109)
        ...
   ```
   So we require it.



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