accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1424099 - /accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/logger/LogService.java
Date Wed, 19 Dec 2012 20:43:26 GMT
Author: ecn
Date: Wed Dec 19 20:43:26 2012
New Revision: 1424099

URL: http://svn.apache.org/viewvc?rev=1424099&view=rev
Log:
ACCUMULO-848 reset the watch on our registration in zookeeper

Modified:
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/logger/LogService.java

Modified: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/logger/LogService.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/logger/LogService.java?rev=1424099&r1=1424098&r2=1424099&view=diff
==============================================================================
--- accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/logger/LogService.java
(original)
+++ accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/logger/LogService.java
Wed Dec 19 20:43:26 2012
@@ -385,6 +385,16 @@ public class LogService implements Mutat
         service.stop();
       }
     }
+    ZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    try {
+      if (!zoo.exists(this.ephemeralNode, this)) {
+        LOG.fatal("Stopping server, zookeeper entry lost " + event.getPath());
+        service.stop();
+      }
+    } catch (Exception ex) {
+      LOG.fatal("Stopping server, cannot reset watch" + ex);
+      service.stop();
+    }
   }
   
   @Override



Mime
View raw message