jojochuang commented on code in PR #8371:
URL: https://github.com/apache/ozone/pull/8371#discussion_r2069873000


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/events/SingleThreadExecutor.java:
##########
@@ -77,42 +59,43 @@ public SingleThreadExecutor(String name, String 
threadNamePrefix) {
   @Override
   public void onMessage(EventHandler<P> handler, P message, EventPublisher
       publisher) {
-    queued.incr();
+    metrics.incrementQueued();
     executor.execute(() -> {
-      scheduled.incr();
+      metrics.incrementScheduled();
       try {
         handler.onMessage(message, publisher);
-        done.incr();
+        metrics.incrementDone();
       } catch (Exception ex) {
         LOG.error("Error on execution message {}", message, ex);
-        failed.incr();
+        metrics.incrementFailed();
       }
     });
   }
 
   @Override
   public long failedEvents() {
-    return failed.value();
+    return metrics.getFailed();
   }
 
   @Override
   public long successfulEvents() {
-    return done.value();
+    return metrics.getDone();
   }
 
   @Override
   public long queuedEvents() {
-    return queued.value();
+    return metrics.getQueued();
   }
 
   @Override
   public long scheduledEvents() {
-    return scheduled.value();
+    return metrics.getScheduled();
   }
 
   @Override
   public void close() {

Review Comment:
   I'm looking for the usage of these two thread executors and whether or not 
they are closed explicitly.
   It looks like they are not closed explicitly so this may not be called 
properly. Probably ok now because they are only initialized once for Recon and 
SCM.



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