forked from apache/helix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The WAGED rebalancer returns the previously calculated assignment on …
…calculation failure (apache#514) * The WAGED rebalancer returns the previously calculated assignment on calculation failure. This is to protect the cluster assignment on a rebalancing algorithm failure. For example, the cluster is out of capacity. In this case, the rebalancer will keep using the previously calculated mapping. Also, refine the new metric interface, and add the RebalanceFailureCount metric for recording the failures. Modify the test cases so that DBs from different test cases have a different name. This is to avoid previous test records to be returned by the rebalancer on calculation error.
- Loading branch information
1 parent
2d89dc9
commit 965aed9
Showing
14 changed files
with
274 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...c/main/java/org/apache/helix/monitoring/metrics/implementation/RebalanceFailureCount.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.apache.helix.monitoring.metrics.implementation; | ||
|
||
import org.apache.helix.monitoring.metrics.model.CountMetric; | ||
|
||
public class RebalanceFailureCount extends CountMetric { | ||
/** | ||
* Instantiates a new Simple dynamic metric. | ||
* | ||
* @param metricName the metric name | ||
*/ | ||
public RebalanceFailureCount(String metricName) { | ||
super(metricName, 0L); | ||
} | ||
|
||
@Override | ||
public void increaseCount(long count) { | ||
updateValue(getValue() + count); | ||
} | ||
} |
Oops, something went wrong.