cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Add partitioner to local system table (for clients sake)
Date Tue, 13 Nov 2012 08:04:25 GMT
Updated Branches:
  refs/heads/cassandra-1.2.0 76613ee4c -> 01c9e1050


Add partitioner to local system table (for clients sake)


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

Branch: refs/heads/cassandra-1.2.0
Commit: 01c9e1050bfbc6fcd884f1e9814d4c03ba328905
Parents: 76613ee
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Tue Nov 13 09:04:08 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Nov 13 09:04:08 2012 +0100

----------------------------------------------------------------------
 .../org/apache/cassandra/config/CFMetaData.java    |    1 +
 src/java/org/apache/cassandra/db/SystemTable.java  |    5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/01c9e105/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 5f0e93a..b50abc5 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -182,6 +182,7 @@ public final class CFMetaData
                                                          + "cql_version text,"
                                                          + "data_center text,"
                                                          + "rack text,"
+                                                         + "partitioner text,"
                                                          + "truncated_at map<uuid, blob>"
                                                          + ") WITH COMMENT='information about
the local node'");
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/01c9e105/src/java/org/apache/cassandra/db/SystemTable.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/SystemTable.java b/src/java/org/apache/cassandra/db/SystemTable.java
index 34f7096..5ec4bd4 100644
--- a/src/java/org/apache/cassandra/db/SystemTable.java
+++ b/src/java/org/apache/cassandra/db/SystemTable.java
@@ -135,7 +135,7 @@ public class SystemTable
 
     private static void setupVersion()
     {
-        String req = "INSERT INTO system.%s (key, release_version, cql_version, thrift_version,
data_center, rack) VALUES ('%s', '%s', '%s', '%s', '%s', '%s')";
+        String req = "INSERT INTO system.%s (key, release_version, cql_version, thrift_version,
data_center, rack, partitioner) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s')";
         IEndpointSnitch snitch = DatabaseDescriptor.getEndpointSnitch();
         processInternal(String.format(req, LOCAL_CF,
                                          LOCAL_KEY,
@@ -143,7 +143,8 @@ public class SystemTable
                                          QueryProcessor.CQL_VERSION.toString(),
                                          Constants.VERSION,
                                          snitch.getDatacenter(FBUtilities.getBroadcastAddress()),
-                                         snitch.getRack(FBUtilities.getBroadcastAddress())));
+                                         snitch.getRack(FBUtilities.getBroadcastAddress()),
+                                         DatabaseDescriptor.getPartitioner().getClass().getName()));
     }
 
     /** if system data becomes incompatible across versions of cassandra, that logic (and
associated purging) is managed here */


Mime
View raw message