hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1087401 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/master/HMaster.java src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
Date Thu, 31 Mar 2011 18:33:38 GMT
Author: stack
Date: Thu Mar 31 18:33:37 2011
New Revision: 1087401

URL: http://svn.apache.org/viewvc?rev=1087401&view=rev
Log:
HBASE-3716 Intermittent TestRegionRebalancing failure

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1087401&r1=1087400&r2=1087401&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Thu Mar 31 18:33:37 2011
@@ -54,6 +54,8 @@ Release 0.91.0 - Unreleased
    HBASE-3709  HFile compression not sharing configuration
    HBASE-3711  importtsv fails if rowkey length exceeds MAX_ROW_LENGTH
                (Kazuki Ohta via todd)
+   HBASE-3716  Intermittent TestRegionRebalancing failure
+               (Ted Yu via Stack)
 
   IMPROVEMENTS
    HBASE-3290  Max Compaction Size (Nicolas Spiegelberg via Stack)  

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1087401&r1=1087400&r2=1087401&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Thu Mar 31 18:33:37
2011
@@ -700,6 +700,7 @@ implements HMasterInterface, HMasterRegi
     // Do this call outside of synchronized block.
     int maximumBalanceTime = getBalancerCutoffTime();
     long cutoffTime = System.currentTimeMillis() + maximumBalanceTime;
+    boolean balancerRan;
     synchronized (this.balancer) {
       // Only allow one balance run at at time.
       if (this.assignmentManager.isRegionsInTransition()) {
@@ -741,6 +742,7 @@ implements HMasterInterface, HMasterRegi
       List<RegionPlan> plans = this.balancer.balanceCluster(assignments);
       int rpCount = 0;	// number of RegionPlans balanced so far
       long totalRegPlanExecTime = 0;
+      balancerRan = plans != null;
       if (plans != null && !plans.isEmpty()) {
         for (RegionPlan plan: plans) {
           LOG.info("balance " + plan);
@@ -766,7 +768,7 @@ implements HMasterInterface, HMasterRegi
         }
       }
     }
-    return true;
+    return balancerRan;
   }
 
   @Override

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java?rev=1087401&r1=1087400&r2=1087401&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java Thu Mar 31
18:33:37 2011
@@ -159,7 +159,7 @@ public class TestRegionRebalancing exten
     // TODO: Fix this test.  Old balancer used to run with 'slop'.  New
     // balancer does not.
     boolean success = false;
-    float slop = (float)0.1;
+    float slop = (float)conf.getFloat("hbase.regions.slop", 0.1f);
     if (slop <= 0) slop = 1;
 
     for (int i = 0; i < 5; i++) {



Mime
View raw message