Constructor and Description |
---|
GoalViolationDetector(KafkaCruiseControlConfig kccConfig,
LoadMonitor loadMonitor,
Queue<Anomaly> anomalies,
org.apache.kafka.common.utils.Time time,
KafkaCruiseControl kafkaCruiseControl,
UpdatableSbcGoalsConfig updatableSbcGoalsConfig,
KafkaCruiseControl.CcStartupMode startupMode,
DataBalancerMetricsRegistry metricsRegistry) |
Modifier and Type | Method and Description |
---|---|
double |
balancednessScore() |
Optional<GoalViolations> |
detectViolations()
Goes through each goal and tries to optimize the cluster model in order to understand if there are any goal violations present.
|
void |
notifyDeadBrokers(Set<Integer> deadBrokers)
Be told of brokers that have left the cluster.
|
void |
notifyNewBrokers(Set<Integer> newBrokers)
Be told of new brokers.
|
void |
run() |
public GoalViolationDetector(KafkaCruiseControlConfig kccConfig, LoadMonitor loadMonitor, Queue<Anomaly> anomalies, org.apache.kafka.common.utils.Time time, KafkaCruiseControl kafkaCruiseControl, UpdatableSbcGoalsConfig updatableSbcGoalsConfig, KafkaCruiseControl.CcStartupMode startupMode, DataBalancerMetricsRegistry metricsRegistry)
public double balancednessScore()
SbcGoalsConfig.triggeringGoals()
.public void notifyNewBrokers(Set<Integer> newBrokers)
newBrokers
- public void notifyDeadBrokers(Set<Integer> deadBrokers)
deadBrokers
- public Optional<GoalViolations> detectViolations() throws Exception
{@link
- org.apache.kafka.common.errors.RebalanceInProgressDuringPlanComputationException} if a reassignment is detected while computing the cluster model
public for testing purposes.Exception