You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/01/03 19:15:02 UTC

[GitHub] [accumulo] dlmarion commented on a change in pull request #2405: Created additional metrics for long assignments and stuck compactions

dlmarion commented on a change in pull request #2405:
URL: https://github.com/apache/accumulo/pull/2405#discussion_r777657761



##########
File path: server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java
##########
@@ -107,8 +108,58 @@
 import com.beust.jcommander.Parameter;
 import com.google.common.base.Preconditions;
 
+import io.micrometer.core.instrument.Gauge;
+import io.micrometer.core.instrument.MeterRegistry;
+
 public class Compactor extends AbstractServer implements CompactorService.Iface {
 
+  private static class CompactionProgress implements MetricsProducer {
+    private final long warnTime;
+    private long time;
+    private long read;
+    private long written;
+    private boolean stuck = false;
+
+    public CompactionProgress(AccumuloConfiguration config) {
+      warnTime = config.getTimeInMillis(Property.TSERV_COMPACTION_WARN_TIME);
+    }
+
+    @Override
+    public void registerMetrics(MeterRegistry registry) {
+      Gauge.builder(METRICS_TSERVER_MAJC_STUCK, this, CompactionProgress::getNumStuck)

Review comment:
       So, each Compactor runs one majc at a time, but the TabletServer can run many of them at once. I was approaching this from the perspective that a user could just plot stuck majc's over time and be able to drill down to one of the processes. For your suggestion to work, I think I would need to emit multiple Timers , one per stuck extent?




-- 
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: notifications-unsubscribe@accumulo.apache.org

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