You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Versions (OS, Maven, Java, and others, as appropriate):
Affected version(s) of this project: 2.1 and up
To Reproduce
Steps to reproduce the behavior (or a link to an example repository that reproduces the problem):
Start an instance of accumulo
Go to the external compactions page
look at the monitors logs
Here are some portions of the logs:
2024-11-22T15:21:46,486 [monitor.Monitor] INFO : User initiated fetch of running External Compactions from localhost:9132
2024-11-22T15:21:46,486 [external.ECResource] INFO : Got coordinator from monitor = Optional[localhost:9132]
2024-11-22T15:21:46,487 [server.HttpChannel] WARN : /rest/ec/running
jakarta.servlet.ServletException: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "m" is null
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:410) ~[jersey-container-servlet-core-3.0.9.jar:?]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346) ~[jersey-container-servlet-core-3.0.9.jar:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:358) ~[jersey-container-servlet-core-3.0.9.jar:?]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:311) ~[jersey-container-servlet-core-3.0.9.jar:?]
...
Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "m" is null
at java.base/java.util.Collections.unmodifiableMap(Collections.java:1476) ~[?:?]
at org.apache.accumulo.monitor.Monitor$ExternalCompactionsSnapshot.<init>(Monitor.java:691) ~[accumulo-monitor-2.1.4-SNAPSHOT.jar:2.1.4-SNAPSHOT]
at org.apache.accumulo.monitor.Monitor.computeExternalCompactionsSnapshot(Monitor.java:710) ~[accumulo-monitor-2.1.4-SNAPSHOT.jar:2.1.4-SNAPSHOT]
at org.apache.accumulo.monitor.Monitor.lambda$new$1(Monitor.java:635) ~[accumulo-monitor-2.1.4-SNAPSHOT.jar:2.1.4-SNAPSHOT]
at com.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Suppliers.java:261) ~[guava-33.0.0-jre.jar:?]
at org.apache.accumulo.monitor.Monitor.getRunnningCompactions(Monitor.java:714) ~[accumulo-monitor-2.1.4-SNAPSHOT.jar:2.1.4-SNAPSHOT]
at org.apache.accumulo.monitor.rest.compactions.external.ECResource.getRunning(ECResource.java:63) ~[accumulo-monitor-2.1.4-SNAPSHOT.jar:2.1.4-SNAPSHOT]
...
The text was updated successfully, but these errors were encountered:
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.
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:
accumulo/server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java
Lines 686 to 711 in 767a68a
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:
The text was updated successfully, but these errors were encountered: