hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [2/2] git commit: HBASE-12257 TestAssignmentManager unsynchronized access to regionPlans
Date Tue, 14 Oct 2014 21:09:09 GMT
HBASE-12257 TestAssignmentManager unsynchronized access to regionPlans


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ed4c8b7e
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ed4c8b7e
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ed4c8b7e

Branch: refs/heads/0.98
Commit: ed4c8b7ec21c8d45cd64fd0760454d2367ab8544
Parents: dc20003
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Tue Oct 14 22:00:44 2014 +0100
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Tue Oct 14 22:08:34 2014 +0100

----------------------------------------------------------------------
 .../apache/hadoop/hbase/master/TestMasterFailover.java | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/ed4c8b7e/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
index 7a786f3..0951d27 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterFailover.java
@@ -262,12 +262,13 @@ public class TestMasterFailover {
 
     // now actually assign them
     for (HRegionInfo hri : enabledAndAssignedRegions) {
-      master.assignmentManager.regionPlans.put(hri.getEncodedName(),
+      master.assignmentManager.addPlan(hri.getEncodedName(),
           new RegionPlan(hri, null, serverName));
       master.assignRegion(hri);
     }
+
     for (HRegionInfo hri : disabledAndAssignedRegions) {
-      master.assignmentManager.regionPlans.put(hri.getEncodedName(),
+      master.assignmentManager.addPlan(hri.getEncodedName(),
           new RegionPlan(hri, null, serverName));
       master.assignRegion(hri);
     }
@@ -593,12 +594,12 @@ public class TestMasterFailover {
 
     // now actually assign them
     for (HRegionInfo hri : enabledAndAssignedRegions) {
-      master.assignmentManager.regionPlans.put(hri.getEncodedName(),
+      master.assignmentManager.addPlan(hri.getEncodedName(),
           new RegionPlan(hri, null, hrs.getServerName()));
       master.assignRegion(hri);
     }
     for (HRegionInfo hri : disabledAndAssignedRegions) {
-      master.assignmentManager.regionPlans.put(hri.getEncodedName(),
+      master.assignmentManager.addPlan(hri.getEncodedName(),
           new RegionPlan(hri, null, hrs.getServerName()));
       master.assignRegion(hri);
     }
@@ -620,12 +621,12 @@ public class TestMasterFailover {
 
     // set region plan to server to be killed and trigger assign
     for (HRegionInfo hri : enabledAndOnDeadRegions) {
-      master.assignmentManager.regionPlans.put(hri.getEncodedName(),
+      master.assignmentManager.addPlan(hri.getEncodedName(),
           new RegionPlan(hri, null, deadServerName));
       master.assignRegion(hri);
     }
     for (HRegionInfo hri : disabledAndOnDeadRegions) {
-      master.assignmentManager.regionPlans.put(hri.getEncodedName(),
+      master.assignmentManager.addPlan(hri.getEncodedName(),
           new RegionPlan(hri, null, deadServerName));
       master.assignRegion(hri);
     }


Mime
View raw message