Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CE17C17980 for ; Wed, 3 Jun 2015 11:17:14 +0000 (UTC) Received: (qmail 78202 invoked by uid 500); 3 Jun 2015 11:17:14 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 78157 invoked by uid 500); 3 Jun 2015 11:17:14 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 78142 invoked by uid 99); 3 Jun 2015 11:17:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2015 11:17:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2E35CDFFA2; Wed, 3 Jun 2015 11:17:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aleksey@apache.org To: commits@cassandra.apache.org Date: Wed, 03 Jun 2015 11:17:14 -0000 Message-Id: <2270533b1c544a94a2741a68c37e14af@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/3] cassandra git commit: Add broadcast and rpc addresses to system.local Repository: cassandra Updated Branches: refs/heads/cassandra-2.2 b2e4d1015 -> 9b2c467f2 Add broadcast and rpc addresses to system.local patch by Carl Yeksigian; reviewed by Aleksey Yeschenko for CASSANDRA-9436 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b6a31fb5 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b6a31fb5 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b6a31fb5 Branch: refs/heads/cassandra-2.2 Commit: b6a31fb5b9f955a159752a09014a13c776fe3e1f Parents: 9b10928 Author: Carl Yeksigian Authored: Fri May 29 13:28:40 2015 -0400 Committer: Aleksey Yeschenko Committed: Wed Jun 3 13:54:59 2015 +0300 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../org/apache/cassandra/config/CFMetaData.java | 4 +++- .../org/apache/cassandra/db/SystemKeyspace.java | 6 ++++-- test/data/serialization/2.0/db.RowMutation.bin | Bin 3599 -> 3599 bytes 4 files changed, 8 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b6a31fb5/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 1aad965..c555a91 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.16: + * Add broadcast and rpc addresses to system.local (CASSANDRA-9436) * Always mark sstable suspect when corrupted (CASSANDRA-9478) * Add database users and permissions to CQL3 documentation (CASSANDRA-7558) * Allow JVM_OPTS to be passed to standalone tools (CASSANDRA-5969) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b6a31fb5/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 056b305..9d0450b 100644 --- a/src/java/org/apache/cassandra/config/CFMetaData.java +++ b/src/java/org/apache/cassandra/config/CFMetaData.java @@ -207,7 +207,9 @@ public final class CFMetaData + "rack text," + "partitioner text," + "schema_version uuid," - + "truncated_at map" + + "truncated_at map," + + "rpc_address inet," + + "broadcast_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/b6a31fb5/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 5b28ea6..e439de7 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) VALUES ('%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) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')"; IEndpointSnitch snitch = DatabaseDescriptor.getEndpointSnitch(); processInternal(String.format(req, LOCAL_CF, LOCAL_KEY, @@ -162,7 +162,9 @@ public class SystemKeyspace Server.CURRENT_VERSION, snitch.getDatacenter(FBUtilities.getBroadcastAddress()), snitch.getRack(FBUtilities.getBroadcastAddress()), - DatabaseDescriptor.getPartitioner().getClass().getName())); + DatabaseDescriptor.getPartitioner().getClass().getName(), + DatabaseDescriptor.getRpcAddress().getHostAddress(), + FBUtilities.getBroadcastAddress().getHostAddress())); } /** http://git-wip-us.apache.org/repos/asf/cassandra/blob/b6a31fb5/test/data/serialization/2.0/db.RowMutation.bin ---------------------------------------------------------------------- diff --git a/test/data/serialization/2.0/db.RowMutation.bin b/test/data/serialization/2.0/db.RowMutation.bin index 73d93e8..664a5b4 100644 Binary files a/test/data/serialization/2.0/db.RowMutation.bin and b/test/data/serialization/2.0/db.RowMutation.bin differ