public static class SbcGoalsConfig.SbcGoalsConfigBuilder extends Object
Constructor and Description |
---|
SbcGoalsConfigBuilder(List<String> rebalancingGoals,
List<String> triggeringGoals)
Validates the basic requirements for the goals.
|
Modifier and Type | Method and Description |
---|---|
SbcGoalsConfig |
build(KafkaCruiseControlConfig config)
Build a
SbcGoalsConfig with a KafkaCruiseControlConfig that already has the associated goals configured. |
Map<String,Object> |
newKafkaCruiseControlConfigGoalConfigs() |
String |
toString() |
public SbcGoalsConfigBuilder(List<String> rebalancingGoals, List<String> triggeringGoals) throws org.apache.kafka.common.errors.BalancerMisconfigurationException
rebalancingGoals
- the desired set of goal class names to be used in rebalancingtriggeringGoals
- the desired set of goal class names to be used in triggering the uneven cluster load taskorg.apache.kafka.common.config.ConfigException
- in case the provided goals are invalidorg.apache.kafka.common.errors.BalancerMisconfigurationException
public Map<String,Object> newKafkaCruiseControlConfigGoalConfigs()
KafkaCruiseControlConfig
goal config name, and the value is a list of goals in string form.public SbcGoalsConfig build(KafkaCruiseControlConfig config) throws org.apache.kafka.common.errors.BalancerMisconfigurationException
SbcGoalsConfig
with a KafkaCruiseControlConfig
that already has the associated goals configured.config
- A KafkaCruiseControlConfig
configured with the given SbcGoalsConfig.rebalancingGoals()
and SbcGoalsConfig.triggeringGoals()
, necessary for instantiating the goal classesorg.apache.kafka.common.errors.BalancerMisconfigurationException