Skip to content

Commit 20c0b58

Browse files
committed
compile fix
1 parent d4c162f commit 20c0b58

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/CostFromRegionLoadFunction.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ protected final double cost() {
7070
return cost.cost();
7171
}
7272

73-
@Override
74-
protected final void updateWeight(double[] weights) {
75-
weights[StochasticLoadBalancer.GeneratorType.RANDOM.ordinal()] += cost.cost();
76-
}
77-
7873
protected double getRegionLoadCost(Collection<BalancerRegionLoad> regionLoadList) {
7974
double cost = 0;
8075
for (BalancerRegionLoad rl : regionLoadList) {

hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/CostFunction.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ protected void regionMoved(int region, int oldServer, int newServer) {
8383

8484
protected abstract double cost();
8585

86-
protected abstract void updateWeight(double[] weights);
86+
protected void updateWeight(double[] weights) {
87+
weights[StochasticLoadBalancer.GeneratorType.RANDOM.ordinal()] += cost();
88+
}
8789

8890
/**
8991
* Scale the value between 0 and 1.

hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/RegionCountSkewCostFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,6 @@ protected void regionMoved(int region, int oldServer, int newServer) {
7575

7676
@Override
7777
protected final void updateWeight(double[] weights) {
78-
weights[StochasticLoadBalancer.GeneratorType.LOAD.ordinal()] += cost.cost();
78+
weights[StochasticLoadBalancer.GeneratorType.LOAD.ordinal()] += cost();
7979
}
8080
}

0 commit comments

Comments
 (0)