public class NoOpDataBalanceEngine extends Object implements DataBalanceEngine
Constructor and Description |
---|
NoOpDataBalanceEngine() |
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 event)
To be called when this DataBalanceEngine should stop execution.
|
void |
removeBroker(int brokerToRemove,
Optional<Long> brokerToRemoveEpoch,
String uid)
Request is invalid if its get handled by SBK while its not controller.
|
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.
|
public DataBalanceEngineContext getDataBalanceEngineContext()
DataBalanceEngine
DataBalanceEngineContext
associated with this DataBalanceEngine.getDataBalanceEngineContext
in interface DataBalanceEngine
public void onActivation(EngineInitializationContext initializationContext)
DataBalanceEngine
onActivation
in interface DataBalanceEngine
public void onDeactivation(BalancerStatusStateMachine.BalancerEvent event)
DataBalanceEngine
onDeactivation
in interface DataBalanceEngine
event
- - Balancer event leading to deactivation of DataBalanceEnginepublic void shutdown()
DataBalanceEngine
shutdown
in interface DataBalanceEngine
public void updateThrottle(Long newThrottle)
DataBalanceEngine
updateThrottle
in interface DataBalanceEngine
newThrottle
- -- new throttle in bytes/second.public void setAutoHealMode(boolean shouldAutoHeal)
DataBalanceEngine
setAutoHealMode
in interface DataBalanceEngine
shouldAutoHeal
- -- if auto-healing should be enabled when goal violations are detected.public boolean isActive()
isActive
in interface DataBalanceEngine
public void removeBroker(int brokerToRemove, Optional<Long> brokerToRemoveEpoch, String uid)
removeBroker
in interface DataBalanceEngine
public void addBrokers(Set<Integer> brokersToAdd, String uid)
addBrokers
in interface DataBalanceEngine
public boolean cancelBrokerRemoval(int brokerId)
DataBalanceEngine
brokerId
cancelBrokerRemoval
in interface DataBalanceEngine
public void notifyNewBrokers(Set<Integer> newBrokers)
DataBalanceEngine
notifyNewBrokers
in interface DataBalanceEngine
public void notifyDeadBrokers(Set<Integer> deadBrokers)
DataBalanceEngine
notifyDeadBrokers
in interface DataBalanceEngine
public kafka.common.EvenClusterLoadStatusDescriptionInternal evenClusterLoadStatus(kafka.server.KafkaConfig kafkaConfig)
DataBalanceEngine
evenClusterLoadStatus
in interface DataBalanceEngine