This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 00b71fb126 Fix Monitor deployment calculation (#6230)
00b71fb126 is described below
commit 00b71fb126fd8b9159cf84e21e37f0f20a218c30
Author: Dave Marion <[email protected]>
AuthorDate: Mon Mar 23 07:47:47 2026 -0400
Fix Monitor deployment calculation (#6230)
The deployment calculation was off because it was being
computed off the metrics cache, which keeps metrics for
10 minutes before expiring them. This change updates the
deployment when the responses are received from the
server instead, so it should represent only servers that
are still alive.
---
.../org/apache/accumulo/monitor/next/SystemInformation.java | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git
a/server/monitor/src/main/java/org/apache/accumulo/monitor/next/SystemInformation.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/next/SystemInformation.java
index c24e213eb0..5ceb09ffe5 100644
---
a/server/monitor/src/main/java/org/apache/accumulo/monitor/next/SystemInformation.java
+++
b/server/monitor/src/main/java/org/apache/accumulo/monitor/next/SystemInformation.java
@@ -448,6 +448,8 @@ public class SystemInformation {
problemHosts.remove(server);
allMetrics.put(server, response);
resourceGroups.add(response.getResourceGroup());
+ deployment.computeIfAbsent(server.getResourceGroup(), g -> new
ConcurrentHashMap<>())
+ .computeIfAbsent(server.getType().name(), t -> new
ProcessSummary()).addResponded();
switch (response.serverType) {
case COMPACTOR:
compactors
@@ -480,7 +482,6 @@ public class SystemInformation {
LOG.error("Unhandled server type in fetch metric response: {}",
response.serverType);
break;
}
-
}
public void processExternalCompactions(Map<String,TExternalCompaction>
running) {
@@ -516,11 +517,8 @@ public class SystemInformation {
}
public void finish() {
- // Compute the deployment overview
- allMetrics.asMap().keySet().forEach(serverId -> {
- deployment.computeIfAbsent(serverId.getResourceGroup(), g -> new
ConcurrentHashMap<>())
- .computeIfAbsent(serverId.getType().name(), t -> new
ProcessSummary()).addResponded();
- });
+ // Update the deployment not-responded numbers based
+ // on the problem hosts.
problemHosts.forEach(serverId -> {
deployment.computeIfAbsent(serverId.getResourceGroup(), g -> new
ConcurrentHashMap<>())
.computeIfAbsent(serverId.getType().name(), t -> new
ProcessSummary())