incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1245017 - /incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Date Thu, 16 Feb 2012 15:13:18 GMT
Author: ecn
Date: Thu Feb 16 15:13:17 2012
New Revision: 1245017

URL: http://svn.apache.org/viewvc?rev=1245017&view=rev
Log:
ACCUMULO-393: fix in 1.3

Modified:
    incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java

Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1245017&r1=1245016&r2=1245017&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
(original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/master/Master.java
Thu Feb 16 15:13:17 2012
@@ -1399,7 +1399,8 @@ public class Master implements Listener,
   private SortedMap<TServerInstance,TabletServerStatus> gatherTableInformation() {
     long start = System.currentTimeMillis();
     SortedMap<TServerInstance,TabletServerStatus> result = new TreeMap<TServerInstance,TabletServerStatus>();
-    for (TServerInstance server : tserverSet.getCurrentServers()) {
+    Set<TServerInstance> currentServers = tserverSet.getCurrentServers();
+    for (TServerInstance server : currentServers) {
       if (serversToShutdown.contains(server))
         continue;
       try {
@@ -1418,6 +1419,14 @@ public class Master implements Listener,
         }
       }
     }
+    synchronized (badServers) {
+      Set<TServerInstance> deadBadServers = new HashSet<TServerInstance>(badServers.keySet());
+      deadBadServers.removeAll(currentServers);
+      if (!badServers.isEmpty()) {
+        log.debug("Forgetting about bad servers: " + badServers);
+      }
+      badServers.entrySet().removeAll(deadBadServers);
+    }
     log.debug(String.format("Finished gathering information from %d servers in %.2f seconds",
result.size(), (System.currentTimeMillis() - start) / 1000.));
     return result;
   }



Mime
View raw message