You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/11/21 21:36:09 UTC

[GitHub] [hbase] d-c-manning commented on a diff in pull request #4874: HBASE-27466: Making metrics instance containing one or more connections.

d-c-manning commented on code in PR #4874:
URL: https://github.com/apache/hbase/pull/4874#discussion_r1025888411


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java:
##########
@@ -54,6 +58,37 @@
 @InterfaceAudience.Private
 public class MetricsConnection implements StatisticTrackable {
 
+  static final Map<String, MetricsConnection> METRICS_INSTANCES =
+    new HashMap<String, MetricsConnection>();
+
+  static MetricsConnection getMetricsConnection(final String scope,

Review Comment:
   The comment on line 55-56 about "be sure to call shutdown()" could be removed, and replaced by "Calling `getMetricsConnection` implicity creates and "starts" instances of these classes; be sure to call `deleteMetricsConnection` to terminate the thread pools they allocate." You could also add a comment about the ref counting model now being used for these objects.



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

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