This is an automated email from the ASF dual-hosted git repository.

keith-turner pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 02c25e826f Add new ClientProperty RPC_SERVER_QUERY_MAX_THREADS (#6676)
02c25e826f is described below

commit 02c25e826f4800a588a177d4771bf00999825cb5
Author: Amanda Villarreal <[email protected]>
AuthorDate: Wed Nov 25 16:15:09 2026 -0600

    Add new ClientProperty RPC_SERVER_QUERY_MAX_THREADS (#6676)
---
 .../org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java | 5 ++++-
 .../src/main/java/org/apache/accumulo/core/conf/ClientProperty.java | 6 ++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
 
b/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
index 85d660ca28..77159c7a5c 100644
--- 
a/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
+++ 
b/core/src/main/java/org/apache/accumulo/core/clientImpl/InstanceOperationsImpl.java
@@ -19,6 +19,7 @@
 package org.apache.accumulo.core.clientImpl;
 
 import static com.google.common.base.Preconditions.checkArgument;
+import static 
org.apache.accumulo.core.conf.ClientProperty.RPC_SERVER_QUERY_MAX_THREADS;
 import static org.apache.accumulo.core.rpc.ThriftUtil.createClient;
 import static org.apache.accumulo.core.rpc.ThriftUtil.createTransport;
 import static org.apache.accumulo.core.rpc.ThriftUtil.getClient;
@@ -56,6 +57,7 @@ import 
org.apache.accumulo.core.clientImpl.thrift.ClientService;
 import org.apache.accumulo.core.clientImpl.thrift.ConfigurationType;
 import org.apache.accumulo.core.clientImpl.thrift.TVersionedProperties;
 import org.apache.accumulo.core.clientImpl.thrift.ThriftSecurityException;
+import org.apache.accumulo.core.conf.ConfigurationTypeHelper;
 import org.apache.accumulo.core.conf.DeprecatedPropertyUtil;
 import org.apache.accumulo.core.data.InstanceId;
 import org.apache.accumulo.core.data.ResourceGroupId;
@@ -410,7 +412,8 @@ public class InstanceOperationsImpl implements 
InstanceOperations {
     } else if (servers.size() == 1) {
       executorService = MoreExecutors.newDirectExecutorService();
     } else {
-      int numThreads = Math.max(4, Math.min((servers.size()) / 10, 256));
+      int numThreads = Math.max(4, Math.min((servers.size()) / 10, 
ConfigurationTypeHelper
+          
.getNumThreads(context.getConfiguration().get(RPC_SERVER_QUERY_MAX_THREADS.getKey()))));
       executorService =
           
context.threadPools().getPoolBuilder(pool).numCoreThreads(numThreads).build();
     }
diff --git 
a/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java 
b/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java
index 1f76c998a7..96726ebd2f 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/ClientProperty.java
@@ -90,10 +90,8 @@ public enum ClientProperty {
   // Scanner
   SCANNER_BATCH_SIZE("scanner.batch.size", "1000", PropertyType.COUNT,
       "Number of key/value pairs that will be fetched at time from tablet 
server", "2.0.0", false),
-
   SCAN_SERVER_SELECTOR("scan.server.selector.impl", 
ConfigurableScanServerSelector.class.getName(),
       PropertyType.CLASSNAME, "Class used by client to find Scan Servers", 
"2.1.0", false),
-
   SCAN_SERVER_SELECTOR_OPTS_PREFIX("scan.server.selector.opts.", "", 
PropertyType.PREFIX,
       "Properties in this category are related to the configuration of the 
scan.server.selector.impl class",
       "2.1.0", false),
@@ -133,8 +131,8 @@ public enum ClientProperty {
   RPC_TRANSPORT_IDLE_TIMEOUT("rpc.transport.idle.timeout", "3s", 
PropertyType.TIMEDURATION,
       "The maximum duration to leave idle transports open in the client's 
transport pool", "2.1.0",
       false),
-
-  ;
+  RPC_SERVER_QUERY_MAX_THREADS("rpc.server.query.max.threads", "256", 
PropertyType.COUNT,
+      "Maximum number of threads to use for querying servers using RPC", 
"4.0.0", false);
 
   private final String key;
   private final String defaultValue;

Reply via email to