accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1414719 - in /accumulo/trunk/core/src/main/java/org/apache/accumulo/core: client/impl/TabletServerBatchWriter.java util/SimpleThreadPool.java
Date Wed, 28 Nov 2012 14:19:00 GMT
Author: kturner
Date: Wed Nov 28 14:18:58 2012
New Revision: 1414719

URL: http://svn.apache.org/viewvc?rev=1414719&view=rev
Log:
ACCUMULO-882 made batch writer threads idle out

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/SimpleThreadPool.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java?rev=1414719&r1=1414718&r2=1414719&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchWriter.java
Wed Nov 28 14:18:58 2012
@@ -33,7 +33,6 @@ import java.util.Set;
 import java.util.Timer;
 import java.util.TimerTask;
 import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
 
@@ -66,7 +65,7 @@ import org.apache.accumulo.core.tabletse
 import org.apache.accumulo.core.tabletserver.thrift.NoSuchScanIDException;
 import org.apache.accumulo.core.tabletserver.thrift.NotServingTabletException;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
-import org.apache.accumulo.core.util.NamingThreadFactory;
+import org.apache.accumulo.core.util.SimpleThreadPool;
 import org.apache.accumulo.core.util.ThriftUtil;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
@@ -597,7 +596,7 @@ public class TabletServerBatchWriter {
     public MutationWriter(int numSendThreads) {
       serversMutations = new HashMap<String,TabletServerMutations>();
       queued = new HashSet<String>();
-      sendThreadPool = Executors.newFixedThreadPool(numSendThreads, new NamingThreadFactory(this.getClass().getName()));
+      sendThreadPool = new SimpleThreadPool(numSendThreads, this.getClass().getName());
       locators = new HashMap<String,TabletLocator>();
     }
     

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/SimpleThreadPool.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/SimpleThreadPool.java?rev=1414719&r1=1414718&r2=1414719&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/SimpleThreadPool.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/util/SimpleThreadPool.java
Wed Nov 28 14:18:58 2012
@@ -27,7 +27,7 @@ import java.util.concurrent.TimeUnit;
 public class SimpleThreadPool extends ThreadPoolExecutor {
   
   public SimpleThreadPool(int max, final String name) {
-    super(max, max, 1l, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new
NamingThreadFactory(name));
+    super(max, max, 4l, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new
NamingThreadFactory(name));
     allowCoreThreadTimeOut(true);
   }
   



Mime
View raw message