HBASE-3278 AssertionError in LoadBalancer
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1042912 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6c2f79d066
commit
21a5df7b4f
|
@ -746,6 +746,7 @@ Release 0.90.0 - Unreleased
|
||||||
HBASE-3309 " Not running balancer because dead regionserver processing" is a lie
|
HBASE-3309 " Not running balancer because dead regionserver processing" is a lie
|
||||||
HBASE-3314 [shell] 'move' is broken
|
HBASE-3314 [shell] 'move' is broken
|
||||||
HBASE-3315 Add debug output for when balancer makes bad balance
|
HBASE-3315 Add debug output for when balancer makes bad balance
|
||||||
|
HBASE-3278 AssertionError in LoadBalancer
|
||||||
|
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
|
@ -259,12 +259,13 @@ public class LoadBalancer {
|
||||||
for(Map.Entry<HServerInfo, List<HRegionInfo>> server :
|
for(Map.Entry<HServerInfo, List<HRegionInfo>> server :
|
||||||
serversByLoad.entrySet()) {
|
serversByLoad.entrySet()) {
|
||||||
int regionCount = server.getKey().getLoad().getNumberOfRegions();
|
int regionCount = server.getKey().getLoad().getNumberOfRegions();
|
||||||
|
if (regionCount >= min) break;
|
||||||
BalanceInfo balanceInfo = serverBalanceInfo.get(server.getKey());
|
BalanceInfo balanceInfo = serverBalanceInfo.get(server.getKey());
|
||||||
if(balanceInfo != null) {
|
if(balanceInfo != null) {
|
||||||
regionCount += balanceInfo.getNumRegionsAdded();
|
regionCount += balanceInfo.getNumRegionsAdded();
|
||||||
}
|
}
|
||||||
if(regionCount >= min) {
|
if(regionCount >= min) {
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
int numToTake = min - regionCount;
|
int numToTake = min - regionCount;
|
||||||
int numTaken = 0;
|
int numTaken = 0;
|
||||||
|
|
|
@ -110,7 +110,8 @@ public class TestLoadBalancer {
|
||||||
new int [] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 123 },
|
new int [] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 123 },
|
||||||
new int [] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 155 },
|
new int [] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 155 },
|
||||||
new int [] { 0, 0, 144, 1, 1, 1, 1, 1123, 133, 138, 12, 1444 },
|
new int [] { 0, 0, 144, 1, 1, 1, 1, 1123, 133, 138, 12, 1444 },
|
||||||
new int [] { 0, 0, 144, 1, 0, 4, 1, 1123, 133, 138, 12, 1444 }
|
new int [] { 0, 0, 144, 1, 0, 4, 1, 1123, 133, 138, 12, 1444 },
|
||||||
|
new int [] { 1538, 1392, 1561, 1557, 1535, 1553, 1385, 1542, 1619 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int [][] regionsAndServersMocks = new int [][] {
|
int [][] regionsAndServersMocks = new int [][] {
|
||||||
|
|
Loading…
Reference in New Issue