This is an automated email from the ASF dual-hosted git repository.
dlmarion pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/2.1 by this push:
new f075515b9d Fix MiniAccumuloClusterImpl.getProcesses (#6072)
f075515b9d is described below
commit f075515b9dcbcf4470cb4f019d15f779c8784cf9
Author: Dave Marion <[email protected]>
AuthorDate: Tue Jan 27 09:24:20 2026 -0500
Fix MiniAccumuloClusterImpl.getProcesses (#6072)
Adds missing processes to the function and guards
against possible NullPointerExceptions.
Closes #6070, #6071
---
.../miniclusterImpl/MiniAccumuloClusterImpl.java | 51 ++++++++++++++++++----
1 file changed, 43 insertions(+), 8 deletions(-)
diff --git
a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java
b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java
index adda1c65be..f986718203 100644
---
a/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java
+++
b/minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java
@@ -789,14 +789,49 @@ public class MiniAccumuloClusterImpl implements
AccumuloCluster {
public Map<ServerType,Collection<ProcessReference>> getProcesses() {
Map<ServerType,Collection<ProcessReference>> result = new HashMap<>();
MiniAccumuloClusterControl control = getClusterControl();
- result.put(ServerType.MANAGER, references(control.managerProcess));
- result.put(ServerType.TABLET_SERVER,
- references(control.tabletServerProcesses.toArray(new Process[0])));
- if (control.zooKeeperProcess != null) {
- result.put(ServerType.ZOOKEEPER, references(control.zooKeeperProcess));
- }
- if (control.gcProcess != null) {
- result.put(ServerType.GARBAGE_COLLECTOR, references(control.gcProcess));
+
+ for (ServerType type : ServerType.values()) {
+ switch (type) {
+ case COMPACTION_COORDINATOR:
+ if (control.coordinatorProcess != null) {
+ result.put(type, references(control.coordinatorProcess));
+ }
+ break;
+ case COMPACTOR:
+ result.put(type, references(control.compactorProcesses.toArray(new
Process[0])));
+ break;
+ case GARBAGE_COLLECTOR:
+ if (control.gcProcess != null) {
+ result.put(type, references(control.gcProcess));
+ }
+ break;
+ case MASTER:
+ case MANAGER:
+ if (control.managerProcess != null) {
+ result.put(type, references(control.managerProcess));
+ }
+ break;
+ case MONITOR:
+ if (control.monitor != null) {
+ result.put(type, references(control.monitor));
+ }
+ break;
+ case SCAN_SERVER:
+ result.put(type, references(control.scanServerProcesses.toArray(new
Process[0])));
+ break;
+ case TABLET_SERVER:
+ result.put(type,
references(control.tabletServerProcesses.toArray(new Process[0])));
+ break;
+ case ZOOKEEPER:
+ if (control.zooKeeperProcess != null) {
+ result.put(type, references(control.zooKeeperProcess));
+ }
+ break;
+ case TRACER:
+ break;
+ default:
+ throw new IllegalArgumentException("Unhandled server type : " +
type);
+ }
}
return result;
}