public interface DataBalanceEngine
Modifier and Type | Method and Description |
---|---|
void |
addBrokers(Set<Integer> brokersToAdd,
String uid) |
boolean |
cancelBrokerRemoval(int brokerId)
Cancel the on-going broker removal operation for the given #
brokerId |
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 |
notifyDeadBrokers(Set<Integer> deadBrokers)
Notify CruiseControl of arrival of brokers that are no longer alive, either because
they were shutdown or not visible to controller because no heartbeat is being received.
|
void |
notifyNewBrokers(Set<Integer> newBrokers)
Notify CruiseControl of arrival of new brokers, which can be used to maintain
updated list of alive 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 |
removeBroker(int brokerToRemove,
Optional<Long> brokerToRemoveEpoch,
String uid)
Schedules the removal of a broker
|
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 |
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.boolean isActive()
void removeBroker(int brokerToRemove, Optional<Long> brokerToRemoveEpoch, String uid)
boolean cancelBrokerRemoval(int brokerId)
brokerId
void notifyNewBrokers(Set<Integer> newBrokers)
void notifyDeadBrokers(Set<Integer> deadBrokers)
kafka.common.EvenClusterLoadStatusDescriptionInternal evenClusterLoadStatus(kafka.server.KafkaConfig kafkaConfig)