HBASE-10694 TableSkewCostFunction#cost() casts integral division result to double

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1575031 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2014-03-06 20:35:11 +00:00
parent f5d80e7596
commit 61d7c89d24
1 changed files with 1 additions and 1 deletions

View File

@ -732,7 +732,7 @@ public class StochasticLoadBalancer extends BaseLoadBalancer {
@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++) {