cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Revert 'start thrift before gossip' part of 4679
Date Mon, 05 Nov 2012 16:35:12 GMT
Updated Branches:
  refs/heads/trunk 617a4ab6f -> 0aef00489


Revert 'start thrift before gossip' part of 4679


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

Branch: refs/heads/trunk
Commit: 0aef004896951372b0d9f7a755d0ad906cc810b2
Parents: 617a4ab
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Nov 5 17:35:05 2012 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Nov 5 17:35:05 2012 +0100

----------------------------------------------------------------------
 .../apache/cassandra/service/CassandraDaemon.java  |   22 +++++++--------
 .../apache/cassandra/service/StorageService.java   |   19 -------------
 2 files changed, 10 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0aef0048/src/java/org/apache/cassandra/service/CassandraDaemon.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java b/src/java/org/apache/cassandra/service/CassandraDaemon.java
index 7b8e7d8..03da7e3 100644
--- a/src/java/org/apache/cassandra/service/CassandraDaemon.java
+++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java
@@ -300,7 +300,16 @@ public class CassandraDaemon
 
         // start server internals
         StorageService.instance.registerDaemon(this);
-        StorageService.instance.initServerLocally();
+        try
+        {
+            StorageService.instance.initServer();
+        }
+        catch (ConfigurationException e)
+        {
+            logger.error("Fatal configuration error", e);
+            System.err.println(e.getMessage() + "\nFatal configuration error; unable to start
server.  See log for stacktrace.");
+            System.exit(1);
+        }
 
         Mx4jTool.maybeLoad();
 
@@ -348,17 +357,6 @@ public class CassandraDaemon
             nativeServer.start();
         else
             logger.info("Not starting native transport as requested. Use JMX (StorageService->startNativeTransport())
to start it");
-
-        try
-        {
-            StorageService.instance.maybeJoinRing(StorageService.RING_DELAY);
-        }
-        catch (ConfigurationException e)
-        {
-            logger.error("Fatal configuration error", e);
-            System.err.println(e.getMessage() + "\nFatal configuration error; unable to start
server.  See log for stacktrace.");
-            System.exit(1);
-        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0aef0048/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 6302507..0e6fd30 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -400,12 +400,6 @@ public class StorageService implements IEndpointStateChangeSubscriber,
StorageSe
 
     public synchronized void initServer(int delay) throws ConfigurationException
     {
-        initServerLocally();
-        maybeJoinRing(delay);
-    }
-
-    public void initServerLocally()
-    {
         logger.info("Cassandra version: " + FBUtilities.getReleaseVersionString());
         logger.info("Thrift API version: " + Constants.VERSION);
         logger.info("CQL supported versions: " + StringUtils.join(ClientState.getCQLSupportedVersion(),
",") + " (default: " + ClientState.DEFAULT_CQL_VERSION + ")");
@@ -501,19 +495,6 @@ public class StorageService implements IEndpointStateChangeSubscriber,
StorageSe
             }
         }, "StorageServiceShutdownHook");
         Runtime.getRuntime().addShutdownHook(drainOnShutdown);
-    }
-
-    public synchronized void maybeJoinRing(int delay) throws ConfigurationException
-    {
-        // This method should only be called as part of the server initialization, so if
initialized == true, we've already gone
-        // through that. If the ring must be joined after the server initialization, use
joinTokenRing() directly.
-        if (initialized)
-        {
-            if (isClientMode)
-                throw new UnsupportedOperationException("StorageService does not support
switching modes.");
-            return;
-        }
-        initialized = true;
 
         if (Boolean.parseBoolean(System.getProperty("cassandra.join_ring", "true")))
         {


Mime
View raw message