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/09/30 09:52:03 UTC

[GitHub] [ozone] xichen01 commented on a diff in pull request #3772: HDDS-7250. Add HttpServer metrics

xichen01 commented on code in PR #3772:
URL: https://github.com/apache/ozone/pull/3772#discussion_r984421566


##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2Metrics.java:
##########
@@ -91,4 +90,10 @@ public void getMetrics(MetricsCollector collector, boolean all) {
         .addGauge(HttpServer2MetricsInfo.HttpServerThreadQueueWaitingTaskCount,
             threadPool.getQueueSize());
   }
+
+  public void unRegister() {
+    MetricsSystem ms = DefaultMetricsSystem.instance();
+    ms.unregisterSource(NAME);

Review Comment:
   Is there a scenario where multiple `HttpServer2` are created in a process, except in testing, or may exist in the future?



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