public interface DataBalanceEngine
Modifier and Type | Method and Description |
---|---|
void |
addBrokers(Set<Integer> brokersToAdd,
String uid,
kafka.common.AliveBrokersSnapshot brokersSnapshot) |
boolean |
cancelBrokerRemoval(Set<Integer> brokerIds)
Cancel the on-going broker removal operation for the given brokers #
brokerIds |
kafka.common.EvenClusterLoadStatusDescriptionInternal |
evenClusterLoadStatus(kafka.server.KafkaConfig kafkaConfig)
Return status of the goal violation detector triggered self balancing.
|
DataBalanceEngineContext |
getDataBalanceEngineContext()
Return
DataBalanceEngineContext associated with this DataBalanceEngine. |
boolean |
isActive() |
void |
notifyBrokerChange(Set<Integer> changedBrokers,
BrokerChangeEvent event)
Notify CruiseControl of some
BrokerChangeEvent in a set of brokers. |
void |
onActivation(EngineInitializationContext initializationContext)
To be called when this DataBalanceEngine should be activated and start running.
|
void |
onDeactivation(BalancerStatusStateMachine.BalancerEvent balancerEvent)
To be called when this DataBalanceEngine should stop execution.
|
void |
removeBrokers(Map<Integer,Optional<Long>> brokersToRemoveAndEpochs,
boolean shouldShutdown,
String uid)
Schedules the removal of a set of brokers
|
void |
setAutoHealMode(boolean shouldAutoHeal)
Enable or disable auto-healing (automatic execution of rebalance plans) when an imbalanced
cluster is detected and broker membership doesn't change.
|
void |
shutdown()
To be called when the object is going away.
|
void |
updateConfigPermanently(String key,
Object value)
Update the KafkaCruiseControlConfig "key" to "value" permanently, i.e.
|
void |
updateThrottle(Long newThrottle)
Update the replication throttles to be used during proposal execution.
|
DataBalanceEngineContext getDataBalanceEngineContext()
DataBalanceEngineContext
associated with this DataBalanceEngine.void onActivation(EngineInitializationContext initializationContext)
void onDeactivation(BalancerStatusStateMachine.BalancerEvent balancerEvent)
balancerEvent
- - Balancer event leading to deactivation of DataBalanceEnginevoid shutdown() throws InterruptedException
InterruptedException
void updateThrottle(Long newThrottle)
newThrottle
- -- new throttle in bytes/second.void setAutoHealMode(boolean shouldAutoHeal)
shouldAutoHeal
- -- if auto-healing should be enabled when goal violations are detected.void updateConfigPermanently(String key, Object value)
key
- -- name of the config, e.g. KafkaCruiseControlConfig.TOPICS_EXCLUDED_FROM_PARTITION_MOVEMENT_CONFIGvalue
- -- the new value that the config should getboolean isActive()
void removeBrokers(Map<Integer,Optional<Long>> brokersToRemoveAndEpochs, boolean shouldShutdown, String uid)
brokersToRemoveAndEpochs
- - a map consisting of the IDs of brokers to remove and each broker's associated broker epochshouldShutdown
- - a boolean indicating whether this removal operation should include the shutdown stepuid
- - a unique id of the operationvoid addBrokers(Set<Integer> brokersToAdd, String uid, kafka.common.AliveBrokersSnapshot brokersSnapshot)
brokersToAdd
- the IDs of the brokers being addeduid
- the unique UID of the operationbrokersSnapshot
- a metadata snapshot of all the brokers in the clusterboolean cancelBrokerRemoval(Set<Integer> brokerIds)
brokerIds
void notifyBrokerChange(Set<Integer> changedBrokers, BrokerChangeEvent event)
BrokerChangeEvent
in a set of brokers.kafka.common.EvenClusterLoadStatusDescriptionInternal evenClusterLoadStatus(kafka.server.KafkaConfig kafkaConfig)