dlmarion commented on code in PR #3484:
URL: https://github.com/apache/accumulo/pull/3484#discussion_r1232477156


##########
minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java:
##########
@@ -614,8 +623,50 @@ public synchronized void start() throws IOException, 
InterruptedException {
       executor = Executors.newSingleThreadExecutor();
     }
 
+    Set<String> queues = getCompactionQueueNames();
+    if (queues.isEmpty()) {
+      throw new IllegalStateException("No Compactor queues configured.");
+    }
+
+    for (String name : queues) {
+      control.startCompactors(Compactor.class, getConfig().getNumCompactors(), 
name);
+    }
+
     verifyUp();
 
+    printProcessSummary();
+
+  }
+
+  private void printProcessSummary() {
+    log.info("Process Summary:");
+    getProcesses().forEach((k, v) -> log.info("{}: {}", k,
+        v.stream().map((pr) -> 
pr.getProcess().pid()).collect(Collectors.toList())));
+  }
+
+  private Set<String> getCompactionQueueNames() {
+
+    Set<String> queueNames = new HashSet<>();
+    AccumuloConfiguration aconf = new 
ConfigurationCopy(config.getSiteConfig());
+    CompactionServicesConfig csc = new CompactionServicesConfig(aconf);
+    ServiceEnvironment senv = new ServiceEnvironmentImpl(getServerContext());
+
+    for (var entry : csc.getPlanners().entrySet()) {
+      String serviceId = entry.getKey();
+
+      var initParams = new 
CompactionPlannerInitParams(CompactionServiceId.of(serviceId),
+          csc.getOptions().get(serviceId), senv);
+
+      ExecutorConfig[] execConfigs =
+          new Gson().fromJson(initParams.getOptions().get("executors"), 
ExecutorConfig[].class);
+
+      for (ExecutorConfig ec : execConfigs) {
+        if (ec.getQueue() != null) {
+          queueNames.add(ec.getQueue());
+        }
+      }

Review Comment:
   Implemented in 9133ce0



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to