cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/8] git commit: Allow compaction of system tables during startup patch by Benedict Elliott Smith; reviewed by jbellis for CASSANDRA-6913
Date Wed, 02 Apr 2014 19:43:32 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 5aafa9876 -> 56d84a7c0
  refs/heads/cassandra-2.1 13510d414 -> 5ab1a341a
  refs/heads/trunk 705171074 -> c7324473f


Allow compaction of system tables during startup
patch by Benedict Elliott Smith; reviewed by jbellis for CASSANDRA-6913


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

Branch: refs/heads/cassandra-2.0
Commit: 56d84a7c028c0498158efb1a3cadea149ab7c1cd
Parents: 5aafa98
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Apr 2 14:35:09 2014 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Apr 2 14:41:29 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                               | 1 +
 src/java/org/apache/cassandra/service/StorageService.java | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/56d84a7c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 3a08c33..d999e88 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.7
+ * Allow compaction of system tables during startup (CASSANDRA-6913)
  * Don't shut ExpiringMap down (CASSANDRA-6948)
  * Restrict Windows to parallel repairs (CASSANDRA-6907)
  * (Hadoop) Allow manually specifying start/end tokens in CFIF (CASSANDRA-6436)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/56d84a7c/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 6b70987..53bbb77 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -34,8 +34,6 @@ import javax.management.Notification;
 import javax.management.NotificationBroadcasterSupport;
 import javax.management.ObjectName;
 
-import static java.nio.charset.StandardCharsets.ISO_8859_1;
-
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Predicate;
 import com.google.common.collect.*;
@@ -88,6 +86,8 @@ import org.apache.cassandra.thrift.cassandraConstants;
 import org.apache.cassandra.tracing.Tracing;
 import org.apache.cassandra.utils.*;
 
+import static java.nio.charset.StandardCharsets.ISO_8859_1;
+
 /**
  * This abstraction contains the token/identifier of this node
  * on the identifier space. This token gets gossiped around.
@@ -2048,7 +2048,9 @@ public class StorageService extends NotificationBroadcasterSupport implements
IE
         double bytes = 0;
         for (String keyspaceName : Schema.instance.getKeyspaces())
         {
-            Keyspace keyspace = Keyspace.open(keyspaceName);
+            Keyspace keyspace = Schema.instance.getKeyspaceInstance(keyspaceName);
+            if (keyspace == null)
+                continue;
             for (ColumnFamilyStore cfs : keyspace.getColumnFamilyStores())
                 bytes += cfs.getLiveDiskSpaceUsed();
         }


Mime
View raw message