cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r966363 - in /cassandra/trunk/src/java/org/apache/cassandra: config/DatabaseDescriptor.java service/StorageService.java
Date Wed, 21 Jul 2010 19:03:23 GMT
Author: gdusbabek
Date: Wed Jul 21 19:03:23 2010
New Revision: 966363

URL: http://svn.apache.org/viewvc?rev=966363&view=rev
Log:
give system keyspace a valid replication strategy. patch by Ching-Shen Chen, reviewed by Gary
Dusbabek. CASSANDRA-1307

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
    cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=966363&r1=966362&r2=966363&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java Wed Jul 21
19:03:23 2010
@@ -47,6 +47,7 @@ import org.apache.cassandra.db.migration
 import org.apache.cassandra.dht.IPartitioner;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.locator.AbstractReplicationStrategy;
+import org.apache.cassandra.locator.RackUnawareStrategy;
 import org.apache.cassandra.locator.IEndpointSnitch;
 import org.apache.cassandra.scheduler.IRequestScheduler;
 import org.apache.cassandra.scheduler.NoScheduler;
@@ -344,7 +345,7 @@ public class DatabaseDescriptor
                 CommitLog.setSegmentSize(conf.commitlog_rotation_threshold_in_mb * 1024 *
1024);
 
             // Hardcoded system tables
-            KSMetaData systemMeta = new KSMetaData(Table.SYSTEM_TABLE, null, -1, new CFMetaData[]{CFMetaData.StatusCf,
+            KSMetaData systemMeta = new KSMetaData(Table.SYSTEM_TABLE, RackUnawareStrategy.class,
1, new CFMetaData[]{CFMetaData.StatusCf,
                                                                                         
         CFMetaData.HintsCf,
                                                                                         
         CFMetaData.MigrationsCf,
                                                                                         
         CFMetaData.SchemaCf
@@ -893,7 +894,7 @@ public class DatabaseDescriptor
     {
         return tables.keySet();
     }
-
+    
     public static List<String> getNonSystemTables()
     {
         List<String> tableslist = new ArrayList<String>(tables.keySet());

Modified: cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java?rev=966363&r1=966362&r2=966363&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java Wed Jul 21 19:03:23
2010
@@ -245,7 +245,7 @@ public class StorageService implements I
         MessagingService.instance.registerVerbHandlers(Verb.SCHEMA_CHECK, new SchemaCheckVerbHandler());
 
         replicationStrategies = new HashMap<String, AbstractReplicationStrategy>();
-        for (String table : DatabaseDescriptor.getNonSystemTables())
+        for (String table : DatabaseDescriptor.getTables())
             initReplicationStrategy(table);
 
         // spin up the streaming serivice so it is available for jmx tools.



Mime
View raw message