cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Shutdown ParallelCompaction reducer executor after use
Date Tue, 10 Jan 2012 08:29:07 GMT
Updated Branches:
  refs/heads/cassandra-1.0 89e54091f -> f64c17e42


Shutdown ParallelCompaction reducer executor after use

patch by jbellis; reviewed by slebresne for CASSANDRA-3711


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f64c17e4
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f64c17e4
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f64c17e4

Branch: refs/heads/cassandra-1.0
Commit: f64c17e428ce4fc73bca4119b4513762cd0120af
Parents: 89e5409
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Jan 10 09:26:51 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Jan 10 09:28:47 2012 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../db/compaction/ParallelCompactionIterable.java  |    5 +++++
 .../org/apache/cassandra/utils/MergeIterator.java  |    7 +++++++
 3 files changed, 13 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f64c17e4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index cadd3cc..04a4294 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -18,6 +18,7 @@
    strategy (CASSANDRA-3666)
  * Don't ignore IOException during compaction (CASSANDRA-3655)
  * Fix assertion error for CF with gc_grace=0 (CASSANDRA-3579)
+ * Shutdown ParallelCompaction reducer executor after use (CASSANDRA-3711)
 Merged from 0.8:
  * avoid logging (harmless) exception when GC takes < 1ms (CASSANDRA-3656)
  * prevent new nodes from thinking down nodes are up forever (CASSANDRA-3626)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f64c17e4/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java b/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
index eefff0e..dba8f55 100644
--- a/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
+++ b/src/java/org/apache/cassandra/db/compaction/ParallelCompactionIterable.java
@@ -195,6 +195,11 @@ public class ParallelCompactionIterable extends AbstractCompactionIterable
             return new CompactedRowContainer(new LazilyCompactedRow(controller, iterators));
         }
 
+        public void close()
+        {
+            executor.shutdown();
+        }
+
         private class MergeTask implements Callable<ColumnFamily>
         {
             private final List<RowContainer> rows;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f64c17e4/src/java/org/apache/cassandra/utils/MergeIterator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/MergeIterator.java b/src/java/org/apache/cassandra/utils/MergeIterator.java
index 1b09ffa..e6d5f1d 100644
--- a/src/java/org/apache/cassandra/utils/MergeIterator.java
+++ b/src/java/org/apache/cassandra/utils/MergeIterator.java
@@ -65,6 +65,8 @@ public abstract class MergeIterator<In,Out> extends AbstractIterator<Out>
implem
                 throw new IOError(e);
             }
         }
+
+        reducer.close();
     }
 
     /** A MergeIterator that consumes multiple input values per output value. */
@@ -179,6 +181,11 @@ public abstract class MergeIterator<In,Out> extends AbstractIterator<Out>
implem
          * To be overriden by implementing classes.
          */
         protected void onKeyChange() {}
+
+        /**
+         * May be overridden by implementations that require cleaning up after use
+         */
+        public void close() {}
     }
 
     private static class OneToOne<In, Out> extends MergeIterator<In, Out>


Mime
View raw message