HBASE-10760 Wrong methods' names in ClusterLoadState class (Victor Xu)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1577914 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2014-03-15 17:51:51 +00:00
parent f3cb34588b
commit d18274e992
2 changed files with 3 additions and 3 deletions

View File

@ -397,7 +397,7 @@ public abstract class BaseLoadBalancer implements LoadBalancer {
float average = cs.getLoadAverage(); // for logging
int floor = (int) Math.floor(average * (1 - slop));
int ceiling = (int) Math.ceil(average * (1 + slop));
if (!(cs.getMinLoad() > ceiling || cs.getMaxLoad() < floor)) {
if (!(cs.getMaxLoad() > ceiling || cs.getMinLoad() < floor)) {
NavigableMap<ServerAndLoad, List<HRegionInfo>> serversByLoad = cs.getServersByLoad();
if (LOG.isTraceEnabled()) {
// If nothing to balance, then don't say anything unless trace-level logging.

View File

@ -75,11 +75,11 @@ public class ClusterLoadState {
return (float) numRegions / numServers;
}
int getMinLoad() {
int getMaxLoad() {
return getServersByLoad().lastKey().getLoad();
}
int getMaxLoad() {
int getMinLoad() {
return getServersByLoad().firstKey().getLoad();
}