accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1410025 - /accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
Date Thu, 15 Nov 2012 21:29:44 GMT
Author: ecn
Date: Thu Nov 15 21:29:44 2012
New Revision: 1410025

URL: http://svn.apache.org/viewvc?rev=1410025&view=rev
Log:
ACCUMULO-834 adjust threadpool size quickly: storm events (like root tablet moves) cause lots
of connections on large clusters

Modified:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java?rev=1410025&r1=1410024&r2=1410025&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/TServerUtils.java
Thu Nov 15 21:29:44 2012
@@ -192,7 +192,7 @@ public class TServerUtils {
       @Override
       public void run() {
         if (pool.getCorePoolSize() <= pool.getActiveCount()) {
-          int larger = pool.getCorePoolSize() + 2;
+          int larger = pool.getCorePoolSize() + Math.min(pool.getQueue().size(), 2);
           log.info("Increasing server thread pool size on " + serverName + " to " + larger);
           pool.setMaximumPoolSize(larger);
           pool.setCorePoolSize(larger);



Mime
View raw message