You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2014/06/12 21:46:30 UTC

[01/10] git commit: Add replace_address_first_boot flag to only replace if not bootstrapped.

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-1.2 2d6babbcc -> 29a89d818
  refs/heads/cassandra-2.0 b48a17bfb -> daf6f68ec
  refs/heads/cassandra-2.1 c94caec1b -> 6c8271f60
  refs/heads/trunk 34e6bd509 -> 8fb393ec3


Add replace_address_first_boot flag to only replace if not bootstrapped.

Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-7356


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

Branch: refs/heads/cassandra-1.2
Commit: 29a89d818a8befa95408e7c6c0a1347e107c3a26
Parents: 2d6babb
Author: Brandon Williams <br...@apache.org>
Authored: Thu Jun 12 14:41:52 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Jun 12 14:41:52 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 .../org/apache/cassandra/config/DatabaseDescriptor.java | 12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/29a89d81/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index dd58ff9..f37eda4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.17
+ * Add replace_address_first_boot flag to only replace if not bootstrapped (CASSANDRA-7356)
  * Enable keepalive for native protocol (CASSANDRA-7380)
  * Check internal addresses for seeds (CASSANDRA-6523)
  * Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/29a89d81/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 3ed82f5..3c58b57 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -744,8 +744,9 @@ public class DatabaseDescriptor
         {
             if (System.getProperty("cassandra.replace_address", null) != null)
                 return InetAddress.getByName(System.getProperty("cassandra.replace_address", null));
-            else
-                return null;
+            else if (System.getProperty("cassandra.replace_address_first_boot", null) != null)
+                return InetAddress.getByName(System.getProperty("cassandra.replace_address_first_boot", null));
+            return null;
         }
         catch (UnknownHostException e)
         {
@@ -771,6 +772,13 @@ public class DatabaseDescriptor
 
     public static boolean isReplacing()
     {
+        if (System.getProperty("cassandra.replace_address_first_boot", null) != null && SystemTable.bootstrapComplete())
+        {
+            logger.info("Replace address on first boot requested; this node is already bootstrapped");
+            return false;
+        }
+        if (getReplaceAddress() != null && SystemTable.bootstrapComplete())
+            throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
         return getReplaceAddress() != null;
     }
 


[05/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

Posted by br...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	CHANGES.txt


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

Branch: refs/heads/cassandra-2.1
Commit: daf6f68ec4fb6536204f23e6855f2befb21f47af
Parents: b48a17b 29a89d8
Author: Brandon Williams <br...@apache.org>
Authored: Thu Jun 12 14:45:44 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Jun 12 14:45:44 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             |  2 ++
 .../org/apache/cassandra/config/DatabaseDescriptor.java | 12 ++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/daf6f68e/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 94e2c5a,f37eda4..a2a978e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,23 @@@
 +2.0.9
 + * Fix native protocol CAS batches (CASSANDRA-7337)
 + * Add per-CF range read request latency metrics (CASSANDRA-7338)
 + * Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
 + * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
 + * Swap local and global default read repair chances (CASSANDRA-7320)
 + * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
 + * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
 + * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
 + * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
 + * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
 + * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
 + * Add authentication support to shuffle (CASSANDRA-6484)
 + * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
 + * Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
 + * Fix infinite loop on exception while streaming (CASSANDRA-7330)
 + * Reference sstables before populating key cache (CASSANDRA-7234)
 +Merged from 1.2:
+ 1.2.17
+  * Add replace_address_first_boot flag to only replace if not bootstrapped (CASSANDRA-7356)
   * Enable keepalive for native protocol (CASSANDRA-7380)
   * Check internal addresses for seeds (CASSANDRA-6523)
   * Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/daf6f68e/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index a368cdb,3c58b57..f3e634a
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@@ -717,6 -772,13 +718,13 @@@ public class DatabaseDescripto
  
      public static boolean isReplacing()
      {
 -        if (System.getProperty("cassandra.replace_address_first_boot", null) != null && SystemTable.bootstrapComplete())
++        if (System.getProperty("cassandra.replace_address_first_boot", null) != null && SystemKeyspace.bootstrapComplete())
+         {
+             logger.info("Replace address on first boot requested; this node is already bootstrapped");
+             return false;
+         }
 -        if (getReplaceAddress() != null && SystemTable.bootstrapComplete())
++        if (getReplaceAddress() != null && SystemKeyspace.bootstrapComplete())
+             throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
          return getReplaceAddress() != null;
      }
  


[03/10] git commit: Add replace_address_first_boot flag to only replace if not bootstrapped.

Posted by br...@apache.org.
Add replace_address_first_boot flag to only replace if not bootstrapped.

Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-7356


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

Branch: refs/heads/cassandra-2.1
Commit: 29a89d818a8befa95408e7c6c0a1347e107c3a26
Parents: 2d6babb
Author: Brandon Williams <br...@apache.org>
Authored: Thu Jun 12 14:41:52 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Jun 12 14:41:52 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 .../org/apache/cassandra/config/DatabaseDescriptor.java | 12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/29a89d81/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index dd58ff9..f37eda4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.17
+ * Add replace_address_first_boot flag to only replace if not bootstrapped (CASSANDRA-7356)
  * Enable keepalive for native protocol (CASSANDRA-7380)
  * Check internal addresses for seeds (CASSANDRA-6523)
  * Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/29a89d81/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 3ed82f5..3c58b57 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -744,8 +744,9 @@ public class DatabaseDescriptor
         {
             if (System.getProperty("cassandra.replace_address", null) != null)
                 return InetAddress.getByName(System.getProperty("cassandra.replace_address", null));
-            else
-                return null;
+            else if (System.getProperty("cassandra.replace_address_first_boot", null) != null)
+                return InetAddress.getByName(System.getProperty("cassandra.replace_address_first_boot", null));
+            return null;
         }
         catch (UnknownHostException e)
         {
@@ -771,6 +772,13 @@ public class DatabaseDescriptor
 
     public static boolean isReplacing()
     {
+        if (System.getProperty("cassandra.replace_address_first_boot", null) != null && SystemTable.bootstrapComplete())
+        {
+            logger.info("Replace address on first boot requested; this node is already bootstrapped");
+            return false;
+        }
+        if (getReplaceAddress() != null && SystemTable.bootstrapComplete())
+            throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
         return getReplaceAddress() != null;
     }
 


[06/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

Posted by br...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	CHANGES.txt


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

Branch: refs/heads/cassandra-2.0
Commit: daf6f68ec4fb6536204f23e6855f2befb21f47af
Parents: b48a17b 29a89d8
Author: Brandon Williams <br...@apache.org>
Authored: Thu Jun 12 14:45:44 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Jun 12 14:45:44 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             |  2 ++
 .../org/apache/cassandra/config/DatabaseDescriptor.java | 12 ++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/daf6f68e/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 94e2c5a,f37eda4..a2a978e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,23 @@@
 +2.0.9
 + * Fix native protocol CAS batches (CASSANDRA-7337)
 + * Add per-CF range read request latency metrics (CASSANDRA-7338)
 + * Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
 + * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
 + * Swap local and global default read repair chances (CASSANDRA-7320)
 + * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
 + * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
 + * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
 + * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
 + * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
 + * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
 + * Add authentication support to shuffle (CASSANDRA-6484)
 + * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
 + * Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
 + * Fix infinite loop on exception while streaming (CASSANDRA-7330)
 + * Reference sstables before populating key cache (CASSANDRA-7234)
 +Merged from 1.2:
+ 1.2.17
+  * Add replace_address_first_boot flag to only replace if not bootstrapped (CASSANDRA-7356)
   * Enable keepalive for native protocol (CASSANDRA-7380)
   * Check internal addresses for seeds (CASSANDRA-6523)
   * Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/daf6f68e/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index a368cdb,3c58b57..f3e634a
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@@ -717,6 -772,13 +718,13 @@@ public class DatabaseDescripto
  
      public static boolean isReplacing()
      {
 -        if (System.getProperty("cassandra.replace_address_first_boot", null) != null && SystemTable.bootstrapComplete())
++        if (System.getProperty("cassandra.replace_address_first_boot", null) != null && SystemKeyspace.bootstrapComplete())
+         {
+             logger.info("Replace address on first boot requested; this node is already bootstrapped");
+             return false;
+         }
 -        if (getReplaceAddress() != null && SystemTable.bootstrapComplete())
++        if (getReplaceAddress() != null && SystemKeyspace.bootstrapComplete())
+             throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
          return getReplaceAddress() != null;
      }
  


[09/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

Posted by br...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: 6c8271f60a3c3e8a2f1e841542bbb58c9073c140
Parents: c94caec daf6f68
Author: Brandon Williams <br...@apache.org>
Authored: Thu Jun 12 14:45:58 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Jun 12 14:45:58 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             |  2 ++
 .../org/apache/cassandra/config/DatabaseDescriptor.java | 12 ++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c8271f6/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index cc968c3,a2a978e..1b320fb
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,23 -1,23 +1,25 @@@
 -2.0.9
 +2.1.0
 + * Fix exception when querying a composite-keyed table with a collection index
 +   (CASSANDRA-7372)
 + * Use node's host id in place of counter ids (CASSANDRA-7366)
   * Fix native protocol CAS batches (CASSANDRA-7337)
 + * Reduce likelihood of contention on local paxos locking (CASSANDRA-7359)
 + * Upgrade to Pig 0.12.1 (CASSANDRA-6556)
 + * Make sure we clear out repair sessions from netstats (CASSANDRA-7329)
 + * Don't fail streams on failure detector downs (CASSANDRA-3569)
 + * Add optional keyspace to DROP INDEX statement (CASSANDRA-7314)
 + * Reduce run time for CQL tests (CASSANDRA-7327)
 + * Fix heap size calculation on Windows (CASSANDRA-7352)
 + * RefCount native frames from netty (CASSANDRA-7245)
 + * Use tarball dir instead of /var for default paths (CASSANDRA-7136)
 +Merged from 2.0:
   * Add per-CF range read request latency metrics (CASSANDRA-7338)
   * Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
 - * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
 - * Swap local and global default read repair chances (CASSANDRA-7320)
 - * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
 - * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
 - * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
 - * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
 - * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
 - * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
 - * Add authentication support to shuffle (CASSANDRA-6484)
 - * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
   * Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
   * Fix infinite loop on exception while streaming (CASSANDRA-7330)
 - * Reference sstables before populating key cache (CASSANDRA-7234)
  Merged from 1.2:
+ 1.2.17
+  * Add replace_address_first_boot flag to only replace if not bootstrapped (CASSANDRA-7356)
   * Enable keepalive for native protocol (CASSANDRA-7380)
   * Check internal addresses for seeds (CASSANDRA-6523)
   * Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c8271f6/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------


[07/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

Posted by br...@apache.org.
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
	CHANGES.txt


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

Branch: refs/heads/trunk
Commit: daf6f68ec4fb6536204f23e6855f2befb21f47af
Parents: b48a17b 29a89d8
Author: Brandon Williams <br...@apache.org>
Authored: Thu Jun 12 14:45:44 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Jun 12 14:45:44 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             |  2 ++
 .../org/apache/cassandra/config/DatabaseDescriptor.java | 12 ++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/daf6f68e/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 94e2c5a,f37eda4..a2a978e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,23 @@@
 +2.0.9
 + * Fix native protocol CAS batches (CASSANDRA-7337)
 + * Add per-CF range read request latency metrics (CASSANDRA-7338)
 + * Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
 + * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
 + * Swap local and global default read repair chances (CASSANDRA-7320)
 + * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
 + * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
 + * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
 + * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
 + * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
 + * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
 + * Add authentication support to shuffle (CASSANDRA-6484)
 + * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
 + * Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
 + * Fix infinite loop on exception while streaming (CASSANDRA-7330)
 + * Reference sstables before populating key cache (CASSANDRA-7234)
 +Merged from 1.2:
+ 1.2.17
+  * Add replace_address_first_boot flag to only replace if not bootstrapped (CASSANDRA-7356)
   * Enable keepalive for native protocol (CASSANDRA-7380)
   * Check internal addresses for seeds (CASSANDRA-6523)
   * Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/daf6f68e/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index a368cdb,3c58b57..f3e634a
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@@ -717,6 -772,13 +718,13 @@@ public class DatabaseDescripto
  
      public static boolean isReplacing()
      {
 -        if (System.getProperty("cassandra.replace_address_first_boot", null) != null && SystemTable.bootstrapComplete())
++        if (System.getProperty("cassandra.replace_address_first_boot", null) != null && SystemKeyspace.bootstrapComplete())
+         {
+             logger.info("Replace address on first boot requested; this node is already bootstrapped");
+             return false;
+         }
 -        if (getReplaceAddress() != null && SystemTable.bootstrapComplete())
++        if (getReplaceAddress() != null && SystemKeyspace.bootstrapComplete())
+             throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
          return getReplaceAddress() != null;
      }
  


[04/10] git commit: Add replace_address_first_boot flag to only replace if not bootstrapped.

Posted by br...@apache.org.
Add replace_address_first_boot flag to only replace if not bootstrapped.

Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-7356


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

Branch: refs/heads/trunk
Commit: 29a89d818a8befa95408e7c6c0a1347e107c3a26
Parents: 2d6babb
Author: Brandon Williams <br...@apache.org>
Authored: Thu Jun 12 14:41:52 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Jun 12 14:41:52 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 .../org/apache/cassandra/config/DatabaseDescriptor.java | 12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/29a89d81/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index dd58ff9..f37eda4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.17
+ * Add replace_address_first_boot flag to only replace if not bootstrapped (CASSANDRA-7356)
  * Enable keepalive for native protocol (CASSANDRA-7380)
  * Check internal addresses for seeds (CASSANDRA-6523)
  * Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/29a89d81/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 3ed82f5..3c58b57 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -744,8 +744,9 @@ public class DatabaseDescriptor
         {
             if (System.getProperty("cassandra.replace_address", null) != null)
                 return InetAddress.getByName(System.getProperty("cassandra.replace_address", null));
-            else
-                return null;
+            else if (System.getProperty("cassandra.replace_address_first_boot", null) != null)
+                return InetAddress.getByName(System.getProperty("cassandra.replace_address_first_boot", null));
+            return null;
         }
         catch (UnknownHostException e)
         {
@@ -771,6 +772,13 @@ public class DatabaseDescriptor
 
     public static boolean isReplacing()
     {
+        if (System.getProperty("cassandra.replace_address_first_boot", null) != null && SystemTable.bootstrapComplete())
+        {
+            logger.info("Replace address on first boot requested; this node is already bootstrapped");
+            return false;
+        }
+        if (getReplaceAddress() != null && SystemTable.bootstrapComplete())
+            throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
         return getReplaceAddress() != null;
     }
 


[02/10] git commit: Add replace_address_first_boot flag to only replace if not bootstrapped.

Posted by br...@apache.org.
Add replace_address_first_boot flag to only replace if not bootstrapped.

Patch by brandonwilliams, reviewed by thobbs for CASSANDRA-7356


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

Branch: refs/heads/cassandra-2.0
Commit: 29a89d818a8befa95408e7c6c0a1347e107c3a26
Parents: 2d6babb
Author: Brandon Williams <br...@apache.org>
Authored: Thu Jun 12 14:41:52 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Jun 12 14:41:52 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             |  1 +
 .../org/apache/cassandra/config/DatabaseDescriptor.java | 12 ++++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/29a89d81/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index dd58ff9..f37eda4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.17
+ * Add replace_address_first_boot flag to only replace if not bootstrapped (CASSANDRA-7356)
  * Enable keepalive for native protocol (CASSANDRA-7380)
  * Check internal addresses for seeds (CASSANDRA-6523)
  * Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/29a89d81/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 3ed82f5..3c58b57 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -744,8 +744,9 @@ public class DatabaseDescriptor
         {
             if (System.getProperty("cassandra.replace_address", null) != null)
                 return InetAddress.getByName(System.getProperty("cassandra.replace_address", null));
-            else
-                return null;
+            else if (System.getProperty("cassandra.replace_address_first_boot", null) != null)
+                return InetAddress.getByName(System.getProperty("cassandra.replace_address_first_boot", null));
+            return null;
         }
         catch (UnknownHostException e)
         {
@@ -771,6 +772,13 @@ public class DatabaseDescriptor
 
     public static boolean isReplacing()
     {
+        if (System.getProperty("cassandra.replace_address_first_boot", null) != null && SystemTable.bootstrapComplete())
+        {
+            logger.info("Replace address on first boot requested; this node is already bootstrapped");
+            return false;
+        }
+        if (getReplaceAddress() != null && SystemTable.bootstrapComplete())
+            throw new RuntimeException("Cannot replace address with a node that is already bootstrapped");
         return getReplaceAddress() != null;
     }
 


[08/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

Posted by br...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.1
Commit: 6c8271f60a3c3e8a2f1e841542bbb58c9073c140
Parents: c94caec daf6f68
Author: Brandon Williams <br...@apache.org>
Authored: Thu Jun 12 14:45:58 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Jun 12 14:45:58 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             |  2 ++
 .../org/apache/cassandra/config/DatabaseDescriptor.java | 12 ++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c8271f6/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index cc968c3,a2a978e..1b320fb
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,23 -1,23 +1,25 @@@
 -2.0.9
 +2.1.0
 + * Fix exception when querying a composite-keyed table with a collection index
 +   (CASSANDRA-7372)
 + * Use node's host id in place of counter ids (CASSANDRA-7366)
   * Fix native protocol CAS batches (CASSANDRA-7337)
 + * Reduce likelihood of contention on local paxos locking (CASSANDRA-7359)
 + * Upgrade to Pig 0.12.1 (CASSANDRA-6556)
 + * Make sure we clear out repair sessions from netstats (CASSANDRA-7329)
 + * Don't fail streams on failure detector downs (CASSANDRA-3569)
 + * Add optional keyspace to DROP INDEX statement (CASSANDRA-7314)
 + * Reduce run time for CQL tests (CASSANDRA-7327)
 + * Fix heap size calculation on Windows (CASSANDRA-7352)
 + * RefCount native frames from netty (CASSANDRA-7245)
 + * Use tarball dir instead of /var for default paths (CASSANDRA-7136)
 +Merged from 2.0:
   * Add per-CF range read request latency metrics (CASSANDRA-7338)
   * Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
 - * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
 - * Swap local and global default read repair chances (CASSANDRA-7320)
 - * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
 - * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
 - * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
 - * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
 - * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
 - * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
 - * Add authentication support to shuffle (CASSANDRA-6484)
 - * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
   * Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
   * Fix infinite loop on exception while streaming (CASSANDRA-7330)
 - * Reference sstables before populating key cache (CASSANDRA-7234)
  Merged from 1.2:
+ 1.2.17
+  * Add replace_address_first_boot flag to only replace if not bootstrapped (CASSANDRA-7356)
   * Enable keepalive for native protocol (CASSANDRA-7380)
   * Check internal addresses for seeds (CASSANDRA-6523)
   * Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6c8271f6/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------


[10/10] git commit: Merge branch 'cassandra-2.1' into trunk

Posted by br...@apache.org.
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 8fb393ec3e54d73fd51ff8a827fe6c87d487e98e
Parents: 34e6bd5 6c8271f
Author: Brandon Williams <br...@apache.org>
Authored: Thu Jun 12 14:46:24 2014 -0500
Committer: Brandon Williams <br...@apache.org>
Committed: Thu Jun 12 14:46:24 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                             |  2 ++
 .../org/apache/cassandra/config/DatabaseDescriptor.java | 12 ++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8fb393ec/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/8fb393ec/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------