cshannon commented on code in PR #5102:
URL: https://github.com/apache/accumulo/pull/5102#discussion_r1869961538
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java:
##########
@@ -404,19 +386,34 @@ public List<ActiveCompaction> getActiveCompactions()
@Override
public List<ActiveCompaction> getActiveCompactions(Collection<ServerId>
compactionServers)
throws AccumuloException, AccumuloSecurityException {
+ return queryServers(compactionServers, this::getActiveCompactions,
+ INSTANCE_OPS_COMPACTIONS_FINDER_POOL);
+ }
+
+ private <T> List<T> queryServers(Collection<ServerId> servers,
ServerQuery<List<T>> serverQuery,
+ ThreadPoolNames pool) throws AccumuloException,
AccumuloSecurityException {
+
+ final ExecutorService executorService;
+ // If size 0 or 1 there's no need to create a thread pool
+ if (servers.isEmpty()) {
+ return List.of();
+ } else if (servers.size() == 1) {
+ executorService = MoreExecutors.newDirectExecutorService();
+ } else {
+ int numThreads = Math.max(4, Math.min((servers.size()) / 10, 256));
Review Comment:
I added a follow on https://github.com/apache/accumulo/issues/5135 to look
into setting a lower default or adding a property
--
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]