keith-turner commented on code in PR #4080:
URL: https://github.com/apache/accumulo/pull/4080#discussion_r1430786265
##########
minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterControl.java:
##########
@@ -254,6 +254,25 @@ public void stop(ServerType server) throws IOException {
stop(server, null);
}
+ public void stopCompactorGroup(String compactorResourceGroup) throws
IOException {
+ synchronized (compactorProcesses) {
+ var group = compactorProcesses.get(compactorResourceGroup);
+ if (group == null) {
+ return;
+ }
+ group.forEach(process -> {
+ try {
+ cluster.stopProcessWithTimeout(process, 30, TimeUnit.SECONDS);
+ } catch (ExecutionException | TimeoutException e) {
+ log.warn("Compactor did not fully stop after 30 seconds", e);
Review Comment:
If there are frequent cases of things wanting to ignore a failure to stop
then a returning an exit code makes sense. If not then throwing a runtime
exception would cause things to fail and not introduce new try/catch blocks in
the code. Would not want to throw a checked exception, that seems like it
would be annoying for this case w/o any benefit.
--
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]