cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [02/10] git commit: backport CASSANDRA-6079
Date Mon, 23 Sep 2013 14:31:59 GMT
backport CASSANDRA-6079


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

Branch: refs/heads/cassandra-2.0
Commit: 2980796a7df00499f6011c1d5db349521c9c5a50
Parents: 7fdcbd0
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Mon Sep 23 09:30:22 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Mon Sep 23 09:30:22 2013 -0500

----------------------------------------------------------------------
 CHANGES.txt                                           |  1 +
 src/java/org/apache/cassandra/db/BatchlogManager.java | 11 +++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2980796a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b4681ae..124b3e4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,7 @@
  * Allow cache-keys-to-save to be set at runtime (CASSANDRA-5980)
  * Allow where clause conditions to be in parenthesis (CASSANDRA-6037)
  * Do not open non-ssl storage port if encryption option is all (CASSANDRA-3916)
+ * Improve memory usage of metadata min/max column names (CASSANDRA-6077)
 
 
 1.2.10

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2980796a/src/java/org/apache/cassandra/db/BatchlogManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/BatchlogManager.java b/src/java/org/apache/cassandra/db/BatchlogManager.java
index c56e106..2488458 100644
--- a/src/java/org/apache/cassandra/db/BatchlogManager.java
+++ b/src/java/org/apache/cassandra/db/BatchlogManager.java
@@ -17,13 +17,16 @@
  */
 package org.apache.cassandra.db;
 
-import java.io.*;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
 import java.lang.management.ManagementFactory;
 import java.net.InetAddress;
 import java.nio.ByteBuffer;
 import java.util.*;
 import java.util.concurrent.CopyOnWriteArraySet;
 import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
@@ -35,6 +38,7 @@ import com.google.common.collect.Lists;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor;
 import org.apache.cassandra.config.CFMetaData;
 import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.cql3.QueryProcessor;
@@ -70,6 +74,8 @@ public class BatchlogManager implements BatchlogManagerMBean
     private final AtomicLong totalBatchesReplayed = new AtomicLong();
     private final AtomicBoolean isReplaying = new AtomicBoolean();
 
+    private static final ScheduledExecutorService batchlogTasks = new DebuggableScheduledThreadPoolExecutor("BatchlogTasks");
+    
     public void start()
     {
         MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
@@ -89,7 +95,8 @@ public class BatchlogManager implements BatchlogManagerMBean
                 replayAllFailedBatches();
             }
         };
-        StorageService.optionalTasks.scheduleWithFixedDelay(runnable, StorageService.RING_DELAY,
REPLAY_INTERVAL, TimeUnit.MILLISECONDS);
+
+        batchlogTasks.scheduleWithFixedDelay(runnable, StorageService.RING_DELAY, REPLAY_INTERVAL,
TimeUnit.MILLISECONDS);
     }
 
     public int countAllBatches()


Mime
View raw message