accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1449755 - /accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/Master.java
Date Mon, 25 Feb 2013 15:55:01 GMT
Author: ecn
Date: Mon Feb 25 15:55:01 2013
New Revision: 1449755

URL: http://svn.apache.org/r1449755
Log:
ACCUMULO-1088 when new tservers a noticed, remove any matching bad server information

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

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/Master.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/Master.java?rev=1449755&r1=1449754&r2=1449755&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/Master.java
(original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/Master.java
Mon Feb 25 15:55:01 2013
@@ -2242,6 +2242,19 @@ public class Master implements LiveTServ
     }
     serversToShutdown.removeAll(deleted);
     badServers.keySet().removeAll(deleted);
+    // clear out any bad server with the same host/port as a new server
+    synchronized (badServers) {
+      Iterator<Entry<TServerInstance,AtomicInteger>> badIter = badServers.entrySet().iterator();
+      while (badIter.hasNext()) {
+        Entry<TServerInstance,AtomicInteger> bad = badIter.next();
+        for (TServerInstance add : added) {
+          if (bad.getKey().hostPort().equals(add.hostPort())) {
+            badIter.remove();
+            break;
+          }
+        }
+      }
+    }
     
     synchronized (migrations) {
       Iterator<Entry<KeyExtent,TServerInstance>> iter = migrations.entrySet().iterator();



Mime
View raw message