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:06:15 UTC

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

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



##########
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:
       With modification - this could show the "stuck" time rather than a boolean.  This would allow users to set external alarms based on time rather than on a boolean condition. It could also provide insight if things can somehow become "unstuck" without intervention, you could plot the stuck time over time to see how things are progressing.




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