HBASE-12762 Region with no hfiles will have the highest locality cost in LocalityCostFunction (cuijianwei)
This commit is contained in:
parent
882f4c9761
commit
0e39b8b9f7
|
@ -1026,7 +1026,9 @@ public class StochasticLoadBalancer extends BaseLoadBalancer {
|
|||
}
|
||||
|
||||
if (index < 0) {
|
||||
cost += 1;
|
||||
if (regionLocations.length > 0) {
|
||||
cost += 1;
|
||||
}
|
||||
} else {
|
||||
cost += (double) index / (double) regionLocations.length;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue