You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kr...@apache.org on 2025/03/03 23:06:59 UTC
(accumulo) branch 3.1 updated (46c4c37646 -> d3c54640cc)
This is an automated email from the ASF dual-hosted git repository.
krathbun pushed a change to branch 3.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git
from 46c4c37646 Adds validation for instance.volumes property (#5365)
add dacc3e972c logs thread id for integration tests (#5377)
add f297977bc7 Tablet server compaction metrics NPE fix (#5364)
new d3c54640cc Merge branch '2.1' into 3.1
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../metrics/CompactionExecutorsMetrics.java | 60 ++++++++++++----------
1 file changed, 34 insertions(+), 26 deletions(-)
(accumulo) 01/01: Merge branch '2.1' into 3.1
Posted by kr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
krathbun pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit d3c54640cc2b53235e5021781cc182c580700bc7
Merge: 46c4c37646 f297977bc7
Author: Kevin Rathbun <ke...@gmail.com>
AuthorDate: Mon Mar 3 17:59:38 2025 -0500
Merge branch '2.1' into 3.1
.../metrics/CompactionExecutorsMetrics.java | 60 ++++++++++++----------
1 file changed, 34 insertions(+), 26 deletions(-)
diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/CompactionExecutorsMetrics.java
index 7f5a5b96af,c2aefb6bdf..71352950b4
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/CompactionExecutorsMetrics.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/metrics/CompactionExecutorsMetrics.java
@@@ -60,6 -57,19 +60,19 @@@ public class CompactionExecutorsMetric
private IntSupplier runningSupplier;
private IntSupplier queuedSupplier;
+ private CeMetrics(CompactionExecutorId ceid) {
+ if (registry != null) {
- this.queued = registry.gauge(METRICS_MAJC_QUEUED, Tags.of("id", ceid.canonical()),
++ this.queued = registry.gauge(MAJC_QUEUED.getName(), Tags.of("id", ceid.canonical()),
+ new AtomicInteger(0));
- this.running = registry.gauge(METRICS_MAJC_RUNNING, Tags.of("id", ceid.canonical()),
++ this.running = registry.gauge(MAJC_RUNNING.getName(), Tags.of("id", ceid.canonical()),
+ new AtomicInteger(0));
+ } else {
+ // these vars have no effect on metrics in this case - just avoids NPEs
+ this.queued = new AtomicInteger(0);
+ this.running = new AtomicInteger(0);
+ }
+ }
+
@Override
public void close() {
runningSupplier = () -> 0;
@@@ -69,9 -79,22 +82,22 @@@
}
}
- private static class ExMetrics {
- AtomicInteger queued;
- AtomicInteger running;
+ private class ExMetrics {
+ private final AtomicInteger queued;
+ private final AtomicInteger running;
+
+ private ExMetrics(CompactionExecutorId ceid) {
+ if (registry != null) {
- this.queued = registry.gauge(METRICS_MAJC_QUEUED, Tags.of("id", ceid.canonical()),
++ this.queued = registry.gauge(MAJC_QUEUED.getName(), Tags.of("id", ceid.canonical()),
+ new AtomicInteger(0));
- this.running = registry.gauge(METRICS_MAJC_RUNNING, Tags.of("id", ceid.canonical()),
++ this.running = registry.gauge(MAJC_RUNNING.getName(), Tags.of("id", ceid.canonical()),
+ new AtomicInteger(0));
+ } else {
+ // these vars have no effect on metrics in this case - just avoids NPEs
+ this.queued = new AtomicInteger(0);
+ this.running = new AtomicInteger(0);
+ }
+ }
}
public CompactionExecutorsMetrics() {