DomGarguilo commented on code in PR #4850:
URL: https://github.com/apache/accumulo/pull/4850#discussion_r1746092637


##########
server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/TabletServerMetrics.java:
##########
@@ -47,58 +66,62 @@ private long getTotalEntriesWritten() {
   @Override
   public void registerMetrics(MeterRegistry registry) {
     FunctionCounter
-        .builder(METRICS_COMPACTOR_ENTRIES_READ, this, 
TabletServerMetrics::getTotalEntriesRead)
+        .builder(COMPACTOR_ENTRIES_READ.getName(), this, 
TabletServerMetrics::getTotalEntriesRead)
         .description("Number of entries read by all compactions that have run 
on this tserver")
         .register(registry);
     FunctionCounter
-        .builder(METRICS_COMPACTOR_ENTRIES_WRITTEN, this,
+        .builder(COMPACTOR_ENTRIES_WRITTEN.getName(), this,
             TabletServerMetrics::getTotalEntriesWritten)
         .description("Number of entries written by all compactions that have 
run on this tserver")
         .register(registry);
-    LongTaskTimer timer = LongTaskTimer.builder(METRICS_TSERVER_MAJC_STUCK)
+    LongTaskTimer timer = LongTaskTimer.builder(TSERVER_MAJC_STUCK.getName())
         .description("Number and duration of stuck major 
compactions").register(registry);
     CompactionWatcher.setTimer(timer);
     Gauge
-        .builder(METRICS_TSERVER_TABLETS_LONG_ASSIGNMENTS, util,
+        .builder(TSERVER_TABLETS_ASSIGNMENTS_WARNING.getName(), util,

Review Comment:
   yea i just renamed the constant name by accident



##########
test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompactionMetricsIT.java:
##########
@@ -127,7 +127,7 @@ public void testMetrics() throws Exception {
             if (shutdownTailer.get()) {
               break;
             }
-            if (s.startsWith(MetricsProducer.METRICS_MAJC_QUEUED)) {
+            if (s.startsWith(TSERVER_MAJC_QUEUED.getName())) {

Review Comment:
   Good catch. it is very confusing having two metrics with such similar names.



##########
server/tserver/src/main/java/org/apache/accumulo/tserver/ScanServerMetrics.java:
##########
@@ -49,15 +55,14 @@ public ScanServerMetrics(final 
LoadingCache<KeyExtent,TabletMetadata> tabletMeta
 
   @Override
   public void registerMetrics(MeterRegistry registry) {
-    totalReservationTimer = 
Timer.builder(MetricsProducer.METRICS_SCAN_RESERVATION_TOTAL_TIMER)
+    totalReservationTimer = 
Timer.builder(SCAN_RESERVATION_TOTAL_TIMER.getName())
         .description("Time to reserve a tablets files for 
scan").register(registry);
-    writeOutReservationTimer = Timer
-        .builder(MetricsProducer.METRICS_SCAN_RESERVATION_WRITEOUT_TIMER)
+    writeOutReservationTimer = 
Timer.builder(SCAN_RESERVATION_WRITEOUT_TIMER.getName())
         .description("Time to write out a tablets file reservations for 
scan").register(registry);
-    FunctionCounter.builder(METRICS_SCAN_BUSY_TIMEOUT_COUNTER, 
busyTimeoutCount, AtomicLong::get)
+    FunctionCounter.builder(SCAN_BUSY_TIMEOUT_COUNT.getName(), 
busyTimeoutCount, AtomicLong::get)
         .description("The number of scans where a busy timeout 
happened").register(registry);
     FunctionCounter
-        .builder(METRICS_SCAN_RESERVATION_CONFLICT_COUNTER, 
reservationConflictCount,
+        .builder(SCAN_RESERVATION_CONFLICT_TIMER.getName(), 
reservationConflictCount,

Review Comment:
   Nope! Nice catch



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

Reply via email to