hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1021501 - in /hadoop/zookeeper/trunk: CHANGES.txt src/contrib/hedwig/server/src/main/java/org/apache/hedwig/server/topics/ZkTopicManager.java
Date Mon, 11 Oct 2010 20:54:25 GMT
Author: breed
Date: Mon Oct 11 20:54:25 2010
New Revision: 1021501

URL: http://svn.apache.org/viewvc?rev=1021501&view=rev
Log:
ZOOKEEPER-886. Hedwig Server stays in "disconnected" state when connection to ZK dies but
gets reconnected

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/contrib/hedwig/server/src/main/java/org/apache/hedwig/server/topics/ZkTopicManager.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=1021501&r1=1021500&r2=1021501&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Mon Oct 11 20:54:25 2010
@@ -110,6 +110,8 @@ BUGFIXES: 
   ZOOKEEPER-822. Leader election taking a long time to complete
   (Vishal K via phunt)
 
+  ZOOKEEPER-866. Hedwig Server stays in "disconnected" state when connection to ZK dies but
gets reconnected (erwin tam via breed)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/contrib/hedwig/server/src/main/java/org/apache/hedwig/server/topics/ZkTopicManager.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/hedwig/server/src/main/java/org/apache/hedwig/server/topics/ZkTopicManager.java?rev=1021501&r1=1021500&r2=1021501&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/contrib/hedwig/server/src/main/java/org/apache/hedwig/server/topics/ZkTopicManager.java
(original)
+++ hadoop/zookeeper/trunk/src/contrib/hedwig/server/src/main/java/org/apache/hedwig/server/topics/ZkTopicManager.java
Mon Oct 11 20:54:25 2010
@@ -92,14 +92,19 @@ public class ZkTopicManager extends Abst
                     if (event.getState().equals(Watcher.Event.KeeperState.Disconnected))
{
                         logger.warn("ZK client has been disconnected to the ZK server!");
                         isSuspended = true;
+                    } else if (event.getState().equals(Watcher.Event.KeeperState.SyncConnected))
{
+			if (isSuspended) {
+	                    logger.info("ZK client has been reconnected to the ZK server!");
+			}
+			isSuspended = false;
                     }
-                } else if (event.getState().equals(Watcher.Event.KeeperState.Expired)) {
+		}
+		// Check for expired connection.
+                if (event.getState().equals(Watcher.Event.KeeperState.Expired)) {
                     logger.error("ZK client connection to the ZK server has expired!");
                     System.exit(1);
-                } else if (event.getState().equals(Watcher.Event.KeeperState.SyncConnected))
{
-                    isSuspended = false;
-                }
-            }
+                }             
+	    }
         });
         final SynchronousQueue<Either<Void, PubSubException>> queue = new SynchronousQueue<Either<Void,
PubSubException>>();
 



Mime
View raw message