accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ktur...@apache.org
Subject svn commit: r1468589 - in /accumulo/branches/1.4: ./ src/ src/core/ src/server/ src/server/src/ src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
Date Tue, 16 Apr 2013 20:13:06 GMT
Author: kturner
Date: Tue Apr 16 20:13:06 2013
New Revision: 1468589

URL: http://svn.apache.org/r1468589
Log:
ACCUMULO-1277 made master delay deleting lockless tserver nodes in zookeeper

Modified:
    accumulo/branches/1.4/   (props changed)
    accumulo/branches/1.4/src/   (props changed)
    accumulo/branches/1.4/src/core/   (props changed)
    accumulo/branches/1.4/src/server/   (props changed)
    accumulo/branches/1.4/src/server/src/   (props changed)
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
    accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
  (props changed)

Propchange: accumulo/branches/1.4/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1468582

Propchange: accumulo/branches/1.4/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1468582
  Merged /accumulo/branches/1.5/src:r1468582

Propchange: accumulo/branches/1.4/src/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/core:r1468582

Propchange: accumulo/branches/1.4/src/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1468582

Propchange: accumulo/branches/1.4/src/server/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server/src:r1468582

Modified: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java?rev=1468589&r1=1468588&r2=1468589&view=diff
==============================================================================
--- accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
(original)
+++ accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
Tue Apr 16 20:13:06 2013
@@ -204,6 +204,7 @@ public class LiveTServerSet implements W
   
   // Map from tserver master service to server information
   private Map<String,TServerInfo> current = new HashMap<String,TServerInfo>();
+  private Map<String,Long> locklessServers = new HashMap<String,Long>();
   
   public LiveTServerSet(Instance instance, Listener cback) {
     this.cback = cback;
@@ -237,6 +238,8 @@ public class LiveTServerSet implements W
       HashSet<String> all = new HashSet<String>(current.keySet());
       all.addAll(getZooCache().getChildren(path));
       
+      locklessServers.keySet().retainAll(all);
+
       for (String server : all) {
         checkServer(updates, doomed, path, server);
       }
@@ -274,8 +277,15 @@ public class LiveTServerSet implements W
         current.remove(server);
       }
       
-      deleteServerNode(path + "/" + server);
+      Long firstSeen = locklessServers.get(server);
+      if (firstSeen == null) {
+        locklessServers.put(server, System.currentTimeMillis());
+      } else if (System.currentTimeMillis() - firstSeen > 600000) {
+        deleteServerNode(path + "/" + server);
+        locklessServers.remove(server);
+      }
     } else {
+      locklessServers.remove(server);
       ServerServices services = new ServerServices(new String(lockData));
       InetSocketAddress client = services.getAddress(ServerServices.Service.TSERV_CLIENT);
       InetSocketAddress addr = AddressUtil.parseAddress(server, Property.TSERV_CLIENTPORT);

Propchange: accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java:r1468582



Mime
View raw message