hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [1/2] git commit: HBASE-12257 TestAssignmentManager unsynchronized access to regionPlans
Date Tue, 14 Oct 2014 21:09:08 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 dc20003d1 -> ed4c8b7ec
  refs/heads/branch-1 936712715 -> 711302e18


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/711302e1
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/711302e1
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/711302e1

Branch: refs/heads/branch-1
Commit: 711302e18b562d47b077fe1fbb6faf02a7ac47c9
Parents: 9367127
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Tue Oct 14 22:04:28 2014 +0100
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Tue Oct 14 22:07: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/711302e1/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 108f76d..6a7b952 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
@@ -265,12 +265,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);
     }
@@ -597,12 +598,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);
     }
@@ -625,12 +626,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