cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [04/10] cassandra git commit: Adding listen_address to system.local (CASSANDRA-9603)
Date Thu, 02 Jul 2015 20:09:31 GMT
Adding listen_address to system.local (CASSANDRA-9603)


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

Branch: refs/heads/trunk
Commit: 3623ea437ee4b22f450a25e670cffe6c00001cb0
Parents: 2a294e4
Author: Carl Yeksigian <carl@apache.org>
Authored: Wed Jul 1 15:05:42 2015 -0400
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Jul 2 13:05:09 2015 -0700

----------------------------------------------------------------------
 CHANGES.txt                                          | 1 +
 src/java/org/apache/cassandra/config/CFMetaData.java | 3 ++-
 src/java/org/apache/cassandra/db/SystemKeyspace.java | 5 +++--
 3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3623ea43/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 07de84c..e453958 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.17
+ * Add listen_address to system.local (CASSANDRA-9603)
  * Bug fixes to resultset metadata construction (CASSANDRA-9636)
  * Fix setting 'durable_writes' in ALTER KEYSPACE (CASSANDRA-9560)
  * Avoid ballot clash in Paxos (CASSANDRA-9649)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3623ea43/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 9d0450b..f50825b 100644
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@ -209,7 +209,8 @@ public final class CFMetaData
                                                      + "schema_version uuid,"
                                                      + "truncated_at map<uuid, blob>,"
                                                      + "rpc_address inet,"
-                                                     + "broadcast_address inet"
+                                                     + "broadcast_address inet,"
+                                                     + "listen_address inet"
                                                      + ") WITH COMMENT='information about
the local node'");
 
     public static final CFMetaData TraceSessionsCf = compile("CREATE TABLE " + Tracing.SESSIONS_CF
+ " ("

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3623ea43/src/java/org/apache/cassandra/db/SystemKeyspace.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/SystemKeyspace.java b/src/java/org/apache/cassandra/db/SystemKeyspace.java
index e439de7..e78e7de 100644
--- a/src/java/org/apache/cassandra/db/SystemKeyspace.java
+++ b/src/java/org/apache/cassandra/db/SystemKeyspace.java
@@ -152,7 +152,7 @@ public class SystemKeyspace
 
     private static void setupVersion()
     {
-        String req = "INSERT INTO system.%s (key, release_version, cql_version, thrift_version,
native_protocol_version, data_center, rack, partitioner, rpc_address, broadcast_address) VALUES
('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')";
+        String req = "INSERT INTO system.%s (key, release_version, cql_version, thrift_version,
native_protocol_version, data_center, rack, partitioner, rpc_address, broadcast_address, listen_address)
VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')";
         IEndpointSnitch snitch = DatabaseDescriptor.getEndpointSnitch();
         processInternal(String.format(req, LOCAL_CF,
                                          LOCAL_KEY,
@@ -164,7 +164,8 @@ public class SystemKeyspace
                                          snitch.getRack(FBUtilities.getBroadcastAddress()),
                                          DatabaseDescriptor.getPartitioner().getClass().getName(),
                                          DatabaseDescriptor.getRpcAddress().getHostAddress(),
-                                         FBUtilities.getBroadcastAddress().getHostAddress()));
+                                         FBUtilities.getBroadcastAddress().getHostAddress(),
+                                         FBUtilities.getLocalAddress().getHostAddress()));
     }
 
     /**


Mime
View raw message