HBASE-3716 Intermittent TestRegionRebalancing failure
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1087401 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a906560ce0
commit
5de1c25b33
|
@ -54,6 +54,8 @@ Release 0.91.0 - Unreleased
|
||||||
HBASE-3709 HFile compression not sharing configuration
|
HBASE-3709 HFile compression not sharing configuration
|
||||||
HBASE-3711 importtsv fails if rowkey length exceeds MAX_ROW_LENGTH
|
HBASE-3711 importtsv fails if rowkey length exceeds MAX_ROW_LENGTH
|
||||||
(Kazuki Ohta via todd)
|
(Kazuki Ohta via todd)
|
||||||
|
HBASE-3716 Intermittent TestRegionRebalancing failure
|
||||||
|
(Ted Yu via Stack)
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
|
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
|
||||||
|
|
|
@ -700,6 +700,7 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server {
|
||||||
// Do this call outside of synchronized block.
|
// Do this call outside of synchronized block.
|
||||||
int maximumBalanceTime = getBalancerCutoffTime();
|
int maximumBalanceTime = getBalancerCutoffTime();
|
||||||
long cutoffTime = System.currentTimeMillis() + maximumBalanceTime;
|
long cutoffTime = System.currentTimeMillis() + maximumBalanceTime;
|
||||||
|
boolean balancerRan;
|
||||||
synchronized (this.balancer) {
|
synchronized (this.balancer) {
|
||||||
// Only allow one balance run at at time.
|
// Only allow one balance run at at time.
|
||||||
if (this.assignmentManager.isRegionsInTransition()) {
|
if (this.assignmentManager.isRegionsInTransition()) {
|
||||||
|
@ -741,6 +742,7 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server {
|
||||||
List<RegionPlan> plans = this.balancer.balanceCluster(assignments);
|
List<RegionPlan> plans = this.balancer.balanceCluster(assignments);
|
||||||
int rpCount = 0; // number of RegionPlans balanced so far
|
int rpCount = 0; // number of RegionPlans balanced so far
|
||||||
long totalRegPlanExecTime = 0;
|
long totalRegPlanExecTime = 0;
|
||||||
|
balancerRan = plans != null;
|
||||||
if (plans != null && !plans.isEmpty()) {
|
if (plans != null && !plans.isEmpty()) {
|
||||||
for (RegionPlan plan: plans) {
|
for (RegionPlan plan: plans) {
|
||||||
LOG.info("balance " + plan);
|
LOG.info("balance " + plan);
|
||||||
|
@ -766,7 +768,7 @@ implements HMasterInterface, HMasterRegionInterface, MasterServices, Server {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return balancerRan;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -159,7 +159,7 @@ public class TestRegionRebalancing extends HBaseClusterTestCase {
|
||||||
// TODO: Fix this test. Old balancer used to run with 'slop'. New
|
// TODO: Fix this test. Old balancer used to run with 'slop'. New
|
||||||
// balancer does not.
|
// balancer does not.
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
float slop = (float)0.1;
|
float slop = (float)conf.getFloat("hbase.regions.slop", 0.1f);
|
||||||
if (slop <= 0) slop = 1;
|
if (slop <= 0) slop = 1;
|
||||||
|
|
||||||
for (int i = 0; i < 5; i++) {
|
for (int i = 0; i < 5; i++) {
|
||||||
|
|
Loading…
Reference in New Issue