cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/3] git commit: remove redundant "name" column from schema_keyspaces patch by jbellis; reviewed by xedin for CASSANDRA-4433
Date Wed, 11 Jul 2012 16:39:15 GMT
remove redundant "name" column from schema_keyspaces
patch by jbellis; reviewed by xedin for CASSANDRA-4433


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

Branch: refs/heads/trunk
Commit: 326312b5db746ecfac19275d560a19c1bfc6362f
Parents: 629dac6
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Jul 10 20:18:58 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Jul 11 11:15:56 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../org/apache/cassandra/config/CFMetaData.java    |    1 -
 .../org/apache/cassandra/config/KSMetaData.java    |    3 +--
 3 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/326312b5/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8957d6c..50a0bcd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2-dev
+ * remove redundant "name" column from schema_keyspaces (CASSANDRA-4433)
  * improve "nodetool ring" handling of multi-dc clusters (CASSANDRA-3047)
  * update NTS calculateNaturalEndpoints to be O(N log N) (CASSANDRA-3881)
  * add UseCondCardMark XX jvm settings on jdk 1.7 (CASSANDRA-4366)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/326312b5/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/CFMetaData.java b/src/java/org/apache/cassandra/config/CFMetaData.java
index 9e10ee2..fb9ae88 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -103,7 +103,6 @@ public final class CFMetaData
     // new-style schema
     public static final CFMetaData SchemaKeyspacesCf = compile(8, "CREATE TABLE " + SystemTable.SCHEMA_KEYSPACES_CF
+ "("
                                                                  + "keyspace_name text PRIMARY
KEY,"
-                                                                 + "name text," // TODO
                                                                  + "durable_writes boolean,"
                                                                  + "strategy_class text,"
                                                                  + "strategy_options text"

http://git-wip-us.apache.org/repos/asf/cassandra/blob/326312b5/src/java/org/apache/cassandra/config/KSMetaData.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/KSMetaData.java b/src/java/org/apache/cassandra/config/KSMetaData.java
index 94de5a2..a7cdda3 100644
--- a/src/java/org/apache/cassandra/config/KSMetaData.java
+++ b/src/java/org/apache/cassandra/config/KSMetaData.java
@@ -220,7 +220,6 @@ public final class KSMetaData
         RowMutation rm = new RowMutation(Table.SYSTEM_TABLE, SystemTable.getSchemaKSKey(name));
         ColumnFamily cf = rm.addOrGet(SystemTable.SCHEMA_KEYSPACES_CF);
 
-        cf.addColumn(Column.create(name, timestamp, "name"));
         cf.addColumn(Column.create(durableWrites, timestamp, "durable_writes"));
         cf.addColumn(Column.create(strategyClass.getName(), timestamp, "strategy_class"));
         cf.addColumn(Column.create(json(strategyOptions), timestamp, "strategy_options"));
@@ -245,7 +244,7 @@ public final class KSMetaData
         UntypedResultSet.Row result = QueryProcessor.resultify("SELECT * FROM system.schema_keyspaces",
row).one();
         try
         {
-            return new KSMetaData(result.getString("name"),
+            return new KSMetaData(result.getString("keyspace_name"),
                                   AbstractReplicationStrategy.getClass(result.getString("strategy_class")),
                                   fromJsonMap(result.getString("strategy_options")),
                                   result.getBoolean("durable_writes"),


Mime
View raw message