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:
parent
f3cb34588b
commit
d18274e992
@ -397,7 +397,7 @@ public abstract class BaseLoadBalancer implements LoadBalancer {
|
|||||||
float average = cs.getLoadAverage(); // for logging
|
float average = cs.getLoadAverage(); // for logging
|
||||||
int floor = (int) Math.floor(average * (1 - slop));
|
int floor = (int) Math.floor(average * (1 - slop));
|
||||||
int ceiling = (int) Math.ceil(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();
|
NavigableMap<ServerAndLoad, List<HRegionInfo>> serversByLoad = cs.getServersByLoad();
|
||||||
if (LOG.isTraceEnabled()) {
|
if (LOG.isTraceEnabled()) {
|
||||||
// If nothing to balance, then don't say anything unless trace-level logging.
|
// If nothing to balance, then don't say anything unless trace-level logging.
|
||||||
|
@ -75,11 +75,11 @@ public class ClusterLoadState {
|
|||||||
return (float) numRegions / numServers;
|
return (float) numRegions / numServers;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getMinLoad() {
|
int getMaxLoad() {
|
||||||
return getServersByLoad().lastKey().getLoad();
|
return getServersByLoad().lastKey().getLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
int getMaxLoad() {
|
int getMinLoad() {
|
||||||
return getServersByLoad().firstKey().getLoad();
|
return getServersByLoad().firstKey().getLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user