cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r771878 - in /incubator/cassandra/trunk/src/java/org/apache/cassandra/gms: FailureDetector.java Gossiper.java
Date Tue, 05 May 2009 16:11:15 GMT
Author: jbellis
Date: Tue May  5 16:11:07 2009
New Revision: 771878

URL: http://svn.apache.org/viewvc?rev=771878&view=rev
Log:
move more gossip log messages to trace and de-obfuscate some variable and method names.
patch by jbellis.

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java?rev=771878&r1=771877&r2=771878&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/FailureDetector.java Tue May
 5 16:11:07 2009
@@ -157,15 +157,15 @@
     
     public void report(EndPoint ep)
     {
-        logger_.debug("reporting as failed " + ep);
+        logger_.trace("reporting " + ep);
         long now = System.currentTimeMillis();
-        ArrivalWindow hbWnd = arrivalSamples_.get(ep);
-        if ( hbWnd == null )
+        ArrivalWindow heartbeatWindow = arrivalSamples_.get(ep);
+        if ( heartbeatWindow == null )
         {
-            hbWnd = new ArrivalWindow(sampleSize_);
-            arrivalSamples_.put(ep, hbWnd);
+            heartbeatWindow = new ArrivalWindow(sampleSize_);
+            arrivalSamples_.put(ep, heartbeatWindow);
         }
-        hbWnd.add(now);  
+        heartbeatWindow.add(now);
     }
     
     public void intepret(EndPoint ep)

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java?rev=771878&r1=771877&r2=771878&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/gms/Gossiper.java Tue May  5 16:11:07
2009
@@ -33,8 +33,6 @@
 import org.apache.cassandra.service.StorageService;
 import org.apache.cassandra.utils.LogUtil;
 import org.apache.log4j.Logger;
-import org.apache.cassandra.utils.*;
-import org.apache.cassandra.net.*;
 
 /**
  * This module is responsible for Gossiping information for the local endpoint. This abstraction
@@ -617,9 +615,9 @@
         }
     }
 
-    void resusitate(EndPoint addr, EndPointState localState)
+    void markAlive(EndPoint addr, EndPointState localState)
     {
-        logger_.debug("Attempting to resusitate " + addr);
+        logger_.trace("marking as alive " + addr);
         if ( !localState.isAlive() )
         {
             isAlive(addr, localState, true);
@@ -667,7 +665,7 @@
 	                int remoteMaxVersion = getMaxEndPointStateVersion(remoteState);
 	                if ( remoteMaxVersion > localMaxVersion )
 	                {
-	                    resusitate(ep, localEpStatePtr);
+	                    markAlive(ep, localEpStatePtr);
 	                    applyHeartBeatStateLocally(ep, localEpStatePtr, remoteState);
 	                    /* apply ApplicationState */
 	                    applyApplicationStateLocally(ep, localEpStatePtr, remoteState);
@@ -688,7 +686,7 @@
 
         if ( remoteHbState.getGeneration() > localHbState.getGeneration() )
         {
-            resusitate(addr, localState);
+            markAlive(addr, localState);
             localState.setHeartBeatState(remoteHbState);
         }
         if ( localHbState.getGeneration() == remoteHbState.getGeneration() )
@@ -697,7 +695,7 @@
             {
                 int oldVersion = localHbState.getHeartBeatVersion();
                 localState.setHeartBeatState(remoteHbState);
-                logger_.debug("Updating heartbeat state version to " + localState.getHeartBeatState().getHeartBeatVersion()
+ " from " + oldVersion + " for " + addr + " ...");
+                logger_.trace("Updating heartbeat state version to " + localState.getHeartBeatState().getHeartBeatVersion()
+ " from " + oldVersion + " for " + addr + " ...");
             }
         }
     }



Mime
View raw message