hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1577913 - in /hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer: BaseLoadBalancer.java ClusterLoadState.java
Date Sat, 15 Mar 2014 17:51:19 GMT
Author: tedyu
Date: Sat Mar 15 17:51:18 2014
New Revision: 1577913

URL: http://svn.apache.org/r1577913
Log:
HBASE-10760 Wrong methods' names in ClusterLoadState class (Victor Xu)


Modified:
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/ClusterLoadState.java

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java?rev=1577913&r1=1577912&r2=1577913&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
Sat Mar 15 17:51:18 2014
@@ -397,7 +397,7 @@ public abstract class BaseLoadBalancer i
     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.

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/ClusterLoadState.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/ClusterLoadState.java?rev=1577913&r1=1577912&r2=1577913&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/ClusterLoadState.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/ClusterLoadState.java
Sat Mar 15 17:51:18 2014
@@ -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();
   }
 



Mime
View raw message