diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java index 2262a0f29d4..0e8a03fa79f 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java @@ -370,7 +370,9 @@ class ConnectionImplementation implements ClusterConnection, Closeable { synchronized (this) { if (batchPool == null) { this.batchPool = getThreadPool(conf.getInt("hbase.hconnection.threads.max", 256), - conf.getInt("hbase.hconnection.threads.core", 256), "-shared-", null); + conf.getInt("hbase.hconnection.threads.core", + Runtime.getRuntime().availableProcessors()), + "-shared-", null); this.cleanupPool = true; } } @@ -385,7 +387,7 @@ class ConnectionImplementation implements ClusterConnection, Closeable { maxThreads = Runtime.getRuntime().availableProcessors() * 8; } if (coreThreads == 0) { - coreThreads = Runtime.getRuntime().availableProcessors() * 8; + coreThreads = Runtime.getRuntime().availableProcessors(); } long keepAliveTime = conf.getLong("hbase.hconnection.threads.keepalivetime", 60); BlockingQueue workQueue = passedWorkQueue; diff --git a/hbase-client/src/test/resources/hbase-site.xml b/hbase-client/src/test/resources/hbase-site.xml index ab4d1cd0b73..57882380451 100644 --- a/hbase-client/src/test/resources/hbase-site.xml +++ b/hbase-client/src/test/resources/hbase-site.xml @@ -25,4 +25,12 @@ hbase.defaults.for.version.skip true + + hbase.hconnection.meta.lookup.threads.core + 4 + + + hbase.hconnection.threads.keepalivetime + 3 + diff --git a/hbase-server/src/test/resources/hbase-site.xml b/hbase-server/src/test/resources/hbase-site.xml index 2d06c0acf5d..1ae5435669b 100644 --- a/hbase-server/src/test/resources/hbase-site.xml +++ b/hbase-server/src/test/resources/hbase-site.xml @@ -162,4 +162,12 @@ Enable replay sanity checks on procedure tests. + + hbase.hconnection.meta.lookup.threads.core + 4 + + + hbase.hconnection.threads.keepalivetime + 3 +