cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r896289 - /incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java
Date Wed, 06 Jan 2010 00:41:00 GMT
Author: jbellis
Date: Wed Jan  6 00:41:00 2010
New Revision: 896289

URL: http://svn.apache.org/viewvc?rev=896289&view=rev
Log:
move check for bootstrapping with the same IP as an existing node to initServer.  patch by
jbellis

Modified:
    incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java

Modified: incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java?rev=896289&r1=896288&r2=896289&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java
(original)
+++ incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/service/StorageService.java
Wed Jan  6 00:41:00 2010
@@ -300,6 +300,11 @@
             logger_.info("Starting in bootstrap mode (first, sleeping to get load information)");
             StorageLoadBalancer.instance().waitForLoadInfo();
             logger_.info("... got load info");
+            if (tokenMetadata_.isMember(FBUtilities.getLocalAddress()))
+            {
+                String s = "This node is already a member of the token ring; bootstrap aborted.
(If replacing a dead node, remove the old one from the ring first.)";
+                throw new UnsupportedOperationException(s);
+            }
             Token token = BootStrapper.getBootstrapToken(tokenMetadata_, StorageLoadBalancer.instance().getLoadInfo());
             startBootstrap(token);
             // don't finish startup (enabling thrift) until after bootstrap is done
@@ -340,11 +345,6 @@
         {
             throw new AssertionError(e);
         }
-        if (tokenMetadata_.isMember(FBUtilities.getLocalAddress()))
-        {
-            String s = "This node is already a member of the token ring; bootstrap aborted.
(If replacing a dead node, remove the old one from the ring first.)";
-            throw new UnsupportedOperationException(s);
-        }
         new BootStrapper(replicationStrategy_, FBUtilities.getLocalAddress(), token, tokenMetadata_).startBootstrap();
// handles token update
     }
 



Mime
View raw message