runzhiwang commented on a change in pull request #76:
URL: https://github.com/apache/incubator-ratis/pull/76#discussion_r418199776
##########
File path:
ratis-metrics/src/main/java/org/apache/ratis/metrics/impl/RatisMetricRegistryImpl.java
##########
@@ -116,4 +123,34 @@ private String getMetricName(String shortName) {
}
}
}
+
+ @Override
+ public void setJmxReporter(JmxReporter jmxReporter) {
+ this.jmxReporter = jmxReporter;
+ }
+
+ @Override
+ public JmxReporter getJmxReporter() {
+ return this.jmxReporter;
+ }
+
+ @Override
+ public void setConsoleReporter(ConsoleReporter consoleReporter) {
+ this.consoleReporter = consoleReporter;
+ }
+
+ @Override
+ public ConsoleReporter getConsoleReporter() {
+ return this.consoleReporter;
+ }
+
+ @Override
+ public void setPrometheusCollector(Collector prometheusCollector) {
Review comment:
@avijayanhwx Thanks for review. Actually, I also do not want to add
prometheus in Ratis.
But because ozone pass a lambda to ratis to register collector in
prometheus, and if we want to unregister the collector when remove registry by
`CollectorRegistry.defaultRegistry.unregister(collector)`, we must record the
collector in Ratis, if you have better idea, plz share it. The following code
copy from ozone related PR: https://github.com/apache/hadoop-ozone/pull/885.

----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]