hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From la...@apache.org
Subject svn commit: r1555966 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Date Mon, 06 Jan 2014 18:32:32 GMT
Author: larsh
Date: Mon Jan  6 18:32:31 2014
New Revision: 1555966

URL: http://svn.apache.org/r1555966
Log:
HBASE-10273 AssignmentManager.regions and AssignmentManager.servers are not always updated
in tandem (Feng Honghua)

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java?rev=1555966&r1=1555965&r2=1555966&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
(original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
Mon Jan  6 18:32:31 2014
@@ -1766,6 +1766,7 @@ public class AssignmentManager extends Z
           }
           synchronized (this.regions) {
             this.regions.put(plan.getRegionInfo(), plan.getDestination());
+            addToServers(plan.getDestination(), plan.getRegionInfo());
           }
         }
         break;
@@ -2250,7 +2251,13 @@ public class AssignmentManager extends Z
             }
             // Remove from the regionsMap
             synchronized (this.regions) {
-              this.regions.remove(region);
+              ServerName sn = this.regions.remove(region);
+              if (sn != null) {
+                Set<HRegionInfo> serverRegions = this.servers.get(sn);
+                if (serverRegions == null || !serverRegions.remove(region)) {
+                  LOG.warn("No " + region + " on " + sn);
+                }
+              }
             }
             deleteClosingOrClosedNode(region);
           }



Mime
View raw message