You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2016/02/17 11:32:34 UTC
[07/16] cassandra git commit: Merge commit 'f4b21f5' into
cassandra-2.2
Merge commit 'f4b21f5' into cassandra-2.2
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6f5dddd9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6f5dddd9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6f5dddd9
Branch: refs/heads/cassandra-3.0
Commit: 6f5dddd966fc16a20f2af8add74b70a9bb11b559
Parents: f3b5ff8 f4b21f5
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Wed Feb 17 11:25:04 2016 +0100
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Wed Feb 17 11:25:31 2016 +0100
----------------------------------------------------------------------
.../org/apache/cassandra/config/Schema.java | 27 ++++++++++++++++++--
.../locator/AbstractReplicationStrategy.java | 5 ++++
.../locator/NetworkTopologyStrategy.java | 6 +++++
.../cassandra/service/StorageService.java | 22 +++++++++-------
4 files changed, 49 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f5dddd9/src/java/org/apache/cassandra/config/Schema.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/Schema.java
index 110029e,739c8ca..2cd7611
--- a/src/java/org/apache/cassandra/config/Schema.java
+++ b/src/java/org/apache/cassandra/config/Schema.java
@@@ -26,19 -28,16 +27,22 @@@ import com.google.common.collect.Sets
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.cassandra.auth.Auth;
++import org.apache.cassandra.auth.AuthKeyspace;
+import org.apache.cassandra.cql3.functions.Functions;
+import org.apache.cassandra.cql3.functions.UDAggregate;
+import org.apache.cassandra.cql3.functions.UDFunction;
import org.apache.cassandra.db.*;
import org.apache.cassandra.db.Keyspace;
+import org.apache.cassandra.db.commitlog.CommitLog;
+import org.apache.cassandra.db.compaction.CompactionManager;
+import org.apache.cassandra.db.marshal.UserType;
import org.apache.cassandra.db.index.SecondaryIndex;
-import org.apache.cassandra.db.index.SecondaryIndexManager;
import org.apache.cassandra.io.sstable.Descriptor;
+import org.apache.cassandra.schema.LegacySchemaTables;
++import org.apache.cassandra.repair.SystemDistributedKeyspace;
import org.apache.cassandra.service.MigrationManager;
-import org.apache.cassandra.tracing.Tracing;
++import org.apache.cassandra.tracing.TraceKeyspace;
import org.apache.cassandra.utils.ConcurrentBiMap;
-import org.apache.cassandra.utils.ByteBufferUtil;
import org.apache.cassandra.utils.Pair;
import org.cliffc.high_scale_lib.NonBlockingHashMap;
@@@ -69,7 -68,9 +73,11 @@@ public class Schem
// 59adb24e-f3cd-3e02-97f0-5b395827453f
public static final UUID emptyVersion;
- public static final ImmutableSet<String> systemKeyspaceNames = ImmutableSet.of(Keyspace.SYSTEM_KS);
- public static final ImmutableSet<String> replicatedSystemKeyspaceNames = ImmutableSet.of(Tracing.TRACE_KS, Auth.AUTH_KS);
+
++ private static final ImmutableSet<String> replicatedSystemKeyspaceNames = ImmutableSet.of(TraceKeyspace.NAME,
++ AuthKeyspace.NAME,
++ SystemDistributedKeyspace.NAME);
+
static
{
try
@@@ -299,8 -291,15 +307,15 @@@
return keyspaces.get(keyspaceName);
}
+ private Set<String> getNonSystemKeyspacesSet()
+ {
- return Sets.difference(keyspaces.keySet(), systemKeyspaceNames);
++ return Sets.difference(keyspaces.keySet(), Collections.singleton(SystemKeyspace.NAME));
+ }
+
/**
- * @return collection of the non-system keyspaces
+ * @return collection of the non-system keyspaces (note that this count as system only the
+ * non replicated keyspaces, so keyspace like system_traces which are replicated are actually
+ * returned. See getUserKeyspace() below if you don't want those)
*/
public List<String> getNonSystemKeyspaces()
{
http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f5dddd9/src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f5dddd9/src/java/org/apache/cassandra/locator/NetworkTopologyStrategy.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/6f5dddd9/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------