HBASE-615 Region balancer oscillates during cluster startup

-Change HServerLoad's getLoad method to ignore the number of requests, thus causing RegionManager to assign based merely on number of regions per server

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@669533 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bryan Duxbury 2008-06-19 16:30:24 +00:00
parent 94956b1e25
commit d5b1dfe30c
2 changed files with 11 additions and 3 deletions

View File

@ -61,6 +61,7 @@ Hbase Change Log
HBASE-683 can not get svn revision # at build time if locale is not english
(Rong-En Fan via Stack)
HBASE-699 Fix TestMigrate up on Hudson
HBASE-615 Region balancer oscillates during cluster startup
IMPROVEMENTS
HBASE-559 MR example job to count table rows

View File

@ -59,12 +59,19 @@ public class HServerLoad implements WritableComparable {
}
/**
* Originally, this method factored in the effect of requests going to the
* server as well. However, this does not interact very well with the current
* region rebalancing code, which only factors number of regions. For the
* interim, until we can figure out how to make rebalancing use all the info
* available, we're just going to make load purely the number of regions.
*
* @return load factor for this server
*/
public int getLoad() {
int load = numberOfRequests == 0 ? 1 : numberOfRequests;
load *= numberOfRegions == 0 ? 1 : numberOfRegions;
return load;
// int load = numberOfRequests == 0 ? 1 : numberOfRequests;
// load *= numberOfRegions == 0 ? 1 : numberOfRegions;
// return load;
return numberOfRegions;
}
/** {@inheritDoc} */