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:
parent
f5d80e7596
commit
61d7c89d24
|
@ -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++) {
|
||||
|
|
Loading…
Reference in New Issue