public class BrokerFailures
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected OptimizationResult |
_optimizationResult |
Constructor and Description |
---|
BrokerFailures(KafkaCruiseControl kafkaCruiseControl,
java.util.Map<java.lang.Integer,java.lang.Long> failedBrokers,
boolean allowCapacityEstimation,
boolean excludeRecentlyDemotedBrokers,
boolean excludeRecentlyRemovedBrokers,
java.util.List<java.lang.String> selfHealingGoals)
An anomaly to indicate broker failure(s).
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
anomalyId() |
java.util.Map<java.lang.Integer,java.lang.Long> |
failedBrokers()
Get the failed broker list and their failure time in millisecond.
|
boolean |
fix()
Fix the anomaly with the system.
|
java.lang.String |
toString() |
protected OptimizationResult _optimizationResult
public BrokerFailures(KafkaCruiseControl kafkaCruiseControl, java.util.Map<java.lang.Integer,java.lang.Long> failedBrokers, boolean allowCapacityEstimation, boolean excludeRecentlyDemotedBrokers, boolean excludeRecentlyRemovedBrokers, java.util.List<java.lang.String> selfHealingGoals)
kafkaCruiseControl
- The Kafka Cruise Control instance.failedBrokers
- Failed broker ids by the detection time, or null for AnomalyDetectorUtils.SHUTDOWN_ANOMALY
allowCapacityEstimation
- Allow capacity estimation in cluster model if the requested broker capacity is unavailable.excludeRecentlyDemotedBrokers
- Exclude recently demoted brokers from proposal generation for leadership transfer.excludeRecentlyRemovedBrokers
- Exclude recently removed brokers from proposal generation for replica transfer.selfHealingGoals
- Goals used for self healing. An empty list indicates the default goals.public java.util.Map<java.lang.Integer,java.lang.Long> failedBrokers()
public java.lang.String anomalyId()
public boolean fix() throws java.lang.Exception
Anomaly
java.lang.Exception
public java.lang.String toString()