public class NoOpDataBalanceEngine extends Object implements DataBalanceEngine
Constructor and Description |
---|
NoOpDataBalanceEngine() |
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 for a set of 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 |
removeBrokers(Map<Integer,Optional<Long>> brokersToRemoveAndEpochs,
boolean shouldShutdown,
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 |
updateConfigPermanently(String configKey,
Object configValue)
Update the KafkaCruiseControlConfig "key" to "value" permanently, i.e.
|
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 void updateConfigPermanently(String configKey, Object configValue)
DataBalanceEngine
updateConfigPermanently
in interface DataBalanceEngine
configKey
- -- name of the config, e.g. KafkaCruiseControlConfig.TOPICS_EXCLUDED_FROM_PARTITION_MOVEMENT_CONFIGconfigValue
- -- the new value that the config should getpublic boolean isActive()
isActive
in interface DataBalanceEngine
public void removeBrokers(Map<Integer,Optional<Long>> brokersToRemoveAndEpochs, boolean shouldShutdown, String uid)
removeBrokers
in interface DataBalanceEngine
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 operationpublic void addBrokers(Set<Integer> brokersToAdd, String uid, kafka.common.AliveBrokersSnapshot brokersSnapshot)
addBrokers
in interface DataBalanceEngine
brokersToAdd
- the IDs of the brokers being addeduid
- the unique UID of the operationbrokersSnapshot
- a metadata snapshot of all the brokers in the clusterpublic boolean cancelBrokerRemoval(Set<Integer> brokerIds)
DataBalanceEngine
brokerIds
cancelBrokerRemoval
in interface DataBalanceEngine
public void notifyBrokerChange(Set<Integer> changedBrokers, BrokerChangeEvent event)
BrokerChangeEvent
for a set of brokers.notifyBrokerChange
in interface DataBalanceEngine
public kafka.common.EvenClusterLoadStatusDescriptionInternal evenClusterLoadStatus(kafka.server.KafkaConfig kafkaConfig)
DataBalanceEngine
evenClusterLoadStatus
in interface DataBalanceEngine