Closed DomGarguilo closed 1 day ago
The following makes it so the exception is not thrown but I'm not sure if this is the best solution:
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
index 80dd69b8cd..bd5111af47 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
@@ -688,7 +688,7 @@ public class Monitor extends AbstractServer implements HighlyAvailableService {
public final Map<String,TExternalCompaction> ecRunningMap;
private ExternalCompactionsSnapshot(Map<String,TExternalCompaction> ecRunningMap) {
- this.ecRunningMap = Collections.unmodifiableMap(ecRunningMap);
+ this.ecRunningMap = ecRunningMap == null ? Collections.emptyMap() : Collections.unmodifiableMap(ecRunningMap);
this.runningCompactions = new RunningCompactions(ecRunningMap);
}
}
Looking at the code, that map having a null is valid so I think simply checking for null like the above example (or maybe using Optional) and just setting it to an immutable map should be fine in this case.
@DomGarguilo - can this be closed, or is there more to do?
Describe the bug When requesting external compaction data from the monitor server, the following code (added in ) is used to memoize and return that data: https://github.com/apache/accumulo/blob/767a68ada50131317e3420dc14780505c523789f/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java#L686-L711
This code was added in #4867.
Versions (OS, Maven, Java, and others, as appropriate):
To Reproduce Steps to reproduce the behavior (or a link to an example repository that reproduces the problem):
Here are some portions of the logs: