cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xe...@apache.org
Subject svn commit: r1165758 - in /cassandra/branches/cassandra-0.8: CHANGES.txt src/java/org/apache/cassandra/cli/CliClient.java
Date Tue, 06 Sep 2011 16:50:33 GMT
Author: xedin
Date: Tue Sep  6 16:50:33 2011
New Revision: 1165758

URL: http://svn.apache.org/viewvc?rev=1165758&view=rev
Log:
Fix CLI `show schema;` to output correct keyspace definition statement
patch by Pavel Yaskevich; reviewed by Jonathan Ellis for CASSANDRA-3129

Modified:
    cassandra/branches/cassandra-0.8/CHANGES.txt
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1165758&r1=1165757&r2=1165758&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Tue Sep  6 16:50:33 2011
@@ -3,6 +3,8 @@
    (CASSANDRA-3138)
  * prevent users from creating keyspaces with LocalStrategy replication
    (CASSANDRA-3139)
+ * fix CLI `show schema;` to output correct keyspace definition statement
+   (CASSANDRA-3129)
 
 0.8.5
  * fix NPE when encryption_options is unspecified (CASSANDRA-3007)

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java?rev=1165758&r1=1165757&r2=1165758&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java (original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/cli/CliClient.java Tue
Sep  6 16:50:33 2011
@@ -1607,11 +1607,10 @@ public class CliClient
      */
     private void showKeyspace(StringBuilder sb, KsDef ksDef)
     {
-
         sb.append("create keyspace " + ksDef.name);
-        if (ksDef.isSetReplication_factor())
-            writeAttr(sb, false, "replication_factor", ksDef.getReplication_factor());
+
         writeAttr(sb, true, "placement_strategy", normaliseType(ksDef.strategy_class, "org.apache.cassandra.locator"));
+
         if (ksDef.strategy_options != null && !ksDef.strategy_options.isEmpty())
         {
             final StringBuilder opts = new StringBuilder();



Mime
View raw message