cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1177365 - in /cassandra/branches/cassandra-1.0.0: CHANGES.txt src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
Date Thu, 29 Sep 2011 17:03:15 GMT
Author: jbellis
Date: Thu Sep 29 17:03:14 2011
New Revision: 1177365

URL: http://svn.apache.org/viewvc?rev=1177365&view=rev
Log:
fix full queue scenario for ParallelCompactionIterator
patch by jbellis; reviewed by slebresne for CASSANDRA-3270

Modified:
    cassandra/branches/cassandra-1.0.0/CHANGES.txt
    cassandra/branches/cassandra-1.0.0/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java

Modified: cassandra/branches/cassandra-1.0.0/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0.0/CHANGES.txt?rev=1177365&r1=1177364&r2=1177365&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0.0/CHANGES.txt (original)
+++ cassandra/branches/cassandra-1.0.0/CHANGES.txt Thu Sep 29 17:03:14 2011
@@ -9,6 +9,7 @@
  * Keep SimpleSnitch proximity ordering unchanged from what the Strategy
    generates, as intended (CASSANDRA-3262)
  * fix counter entry in jdbc TypesMap (CASSANDRA-3268)
+ * fix full queue scenario for ParallelCompactionIterator (CASSANDRA-3270)
 
 
 1.0.0-rc1

Modified: cassandra/branches/cassandra-1.0.0/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-1.0.0/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java?rev=1177365&r1=1177364&r2=1177365&view=diff
==============================================================================
--- cassandra/branches/cassandra-1.0.0/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
(original)
+++ cassandra/branches/cassandra-1.0.0/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
Thu Sep 29 17:03:14 2011
@@ -144,21 +144,13 @@ public class ParallelCompactionIterable 
     private class Reducer extends MergeIterator.Reducer<RowContainer, CompactedRowContainer>
     {
         private final List<RowContainer> rows = new ArrayList<RowContainer>();
-
-        private final ThreadPoolExecutor executor;
         private int row = 0;
 
-        private Reducer()
-        {
-            super();
-            executor = new ThreadPoolExecutor(Runtime.getRuntime().availableProcessors(),
-                                              Runtime.getRuntime().availableProcessors(),
-                                              Integer.MAX_VALUE,
-                                              TimeUnit.MILLISECONDS,
-                                              new SynchronousQueue<Runnable>(),
-                                              new NamedThreadFactory("CompactionReducer"));
-            executor.setRejectedExecutionHandler(DebuggableThreadPoolExecutor.blockingExecutionHandler);
-        }
+        private final ThreadPoolExecutor executor = new DebuggableThreadPoolExecutor(Runtime.getRuntime().availableProcessors(),
+                                                                                     Integer.MAX_VALUE,
+                                                                                     TimeUnit.MILLISECONDS,
+                                                                                     new
SynchronousQueue<Runnable>(),
+                                                                                     new
NamedThreadFactory("CompactionReducer"));
 
         public void reduce(RowContainer current)
         {



Mime
View raw message