keith-turner commented on a change in pull request #2096:
URL: https://github.com/apache/accumulo/pull/2096#discussion_r637241473
##########
File path:
server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/CompactionExecutorsMetrics.java
##########
@@ -77,10 +92,47 @@ public synchronized AutoCloseable
addExecutor(CompactionExecutorId ceid,
@Override
public void prepareMetrics() {
+
+ if (externalMetricsSupplier != null) {
+
+ Set<CompactionExecutorId> seenIds = new HashSet<>();
+
+ MetricsRegistry registry = super.getRegistry();
+
+ synchronized (exMetrics) {
+ externalMetricsSupplier.get().forEach(ecm -> {
+ seenIds.add(ecm.ceid);
+
+ ExMetrics exm = exMetrics.computeIfAbsent(ecm.ceid, id -> {
+ ExMetrics m = new ExMetrics();
+ m.queuedGauge = registry.newGauge(id.canonical().replace('.', '_')
+ "_queued",
Review comment:
Wondering if a queue being configured out of existence causes any
problems for the gauges that may be left around.
--
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]