You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2013/04/16 22:05:41 UTC
svn commit: r1468585 - in /accumulo/trunk: ./ assemble/ core/ examples/
fate/src/main/java/org/apache/accumulo/fate/
fate/src/main/java/org/apache/accumulo/fate/zookeeper/ server/
server/src/main/java/org/apache/accumulo/server/master/ src/
Author: kturner
Date: Tue Apr 16 20:05:40 2013
New Revision: 1468585
URL: http://svn.apache.org/r1468585
Log:
ACCUMULO-1277 made master delay deleting lockless tserver nodes in zookeeper
Modified:
accumulo/trunk/ (props changed)
accumulo/trunk/assemble/ (props changed)
accumulo/trunk/core/ (props changed)
accumulo/trunk/examples/ (props changed)
accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java (props changed)
accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java (props changed)
accumulo/trunk/pom.xml (props changed)
accumulo/trunk/server/ (props changed)
accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
accumulo/trunk/src/ (props changed)
Propchange: accumulo/trunk/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5:r1468582
Propchange: accumulo/trunk/assemble/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/assemble:r1468582
Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/core:r1468582
Propchange: accumulo/trunk/examples/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/examples:r1468582
Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1468582
Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:r1468582
Propchange: accumulo/trunk/pom.xml
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/pom.xml:r1468582
Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/server:r1468582
Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java?rev=1468585&r1=1468584&r2=1468585&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java (original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/master/LiveTServerSet.java Tue Apr 16 20:05:40 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, AccumuloConfiguration conf, Listener cback) {
this.cback = cback;
@@ -238,6 +239,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);
}
@@ -275,8 +278,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/trunk/src/
------------------------------------------------------------------------------
Merged /accumulo/branches/1.5/src:r1468582