cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r888712 - in /incubator/cassandra/trunk/src/java/org/apache/cassandra: cli/CliMain.java db/Table.java service/StorageService.java
Date Wed, 09 Dec 2009 06:33:09 GMT
Author: jbellis
Date: Wed Dec  9 06:33:08 2009
New Revision: 888712

URL: http://svn.apache.org/viewvc?rev=888712&view=rev
Log:
replace "system" magic strings with SYSTEM_TABLE constant.  patch by Stu Hood

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/cli/CliMain.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/cli/CliMain.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/cli/CliMain.java?rev=888712&r1=888711&r2=888712&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/cli/CliMain.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/cli/CliMain.java Wed Dec  9 06:33:08
2009
@@ -27,6 +27,7 @@
 import java.io.*;
 
 import org.apache.cassandra.service.Cassandra;
+import static org.apache.cassandra.db.Table.SYSTEM_TABLE;
 
 //
 // Cassandra Command Line Interface (CLI) Main
@@ -79,7 +80,7 @@
             for (String keyspace : thriftClient_.get_string_list_property("keyspaces"))
             {
                 // Ignore system column family
-                if (keyspace.equals("system"))
+                if (keyspace.equals(SYSTEM_TABLE))
                     continue;
                 
                 for (String cf : cliClient_.getCFMetaData(keyspace).keySet())

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java?rev=888712&r1=888711&r2=888712&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java Wed Dec  9 06:33:08
2009
@@ -257,7 +257,7 @@
      */
     public void forceCleanup()
     {
-        if (table_.equals("system"))
+        if (table_.equals(SYSTEM_TABLE))
             throw new RuntimeException("Cleanup of the system table is neither necessary
nor wise");
 
         Set<String> columnFamilies = tableMetadata_.getColumnFamilies();

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java?rev=888712&r1=888711&r2=888712&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageService.java Wed
Dec  9 06:33:08 2009
@@ -626,7 +626,7 @@
         List<String> tables = DatabaseDescriptor.getTables();
         for (String tName : tables)
         {
-            if (tName.equals("system"))
+            if (tName.equals(Table.SYSTEM_TABLE))
                 continue;
             Table table = Table.open(tName);
             table.forceCleanup();



Mime
View raw message