hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1575031 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
Date Thu, 06 Mar 2014 20:35:11 GMT
Author: tedyu
Date: Thu Mar  6 20:35:11 2014
New Revision: 1575031

URL: http://svn.apache.org/r1575031
Log:
HBASE-10694 TableSkewCostFunction#cost() casts integral division result to double


Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java?rev=1575031&r1=1575030&r2=1575031&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
Thu Mar  6 20:35:11 2014
@@ -732,7 +732,7 @@ public class StochasticLoadBalancer exte
     @Override
     double cost(Cluster cluster) {
       double max = cluster.numRegions;
-      double min = cluster.numRegions / cluster.numServers;
+      double min = ((double) cluster.numRegions) / cluster.numServers;
       double value = 0;
 
       for (int i = 0; i < cluster.numMaxRegionsPerTable.length; i++) {



Mime
View raw message