public class KafkaDataBalanceManager
extends java.lang.Object
implements kafka.controller.DataBalanceManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTIVE_BALANCER_COUNT_METRIC_NAME |
static java.lang.String |
BROKER_ADDITION_STATE_METRIC_NAME |
static java.lang.String |
BROKER_REMOVAL_STATE_METRIC_NAME |
Constructor and Description |
---|
KafkaDataBalanceManager(kafka.server.KafkaConfig kafkaConfig)
Create a KafkaDataBalanceManager.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<kafka.common.BrokerAdditionDescriptionInternal> |
brokerAdditions() |
java.util.List<kafka.common.BrokerRemovalDescriptionInternal> |
brokerRemovals() |
static java.lang.Integer |
getBrokerId(kafka.server.KafkaConfig config) |
boolean |
isActive() |
void |
onBrokersStartup(java.util.Set<java.lang.Integer> emptyBrokers,
java.util.Set<java.lang.Integer> newBrokers) |
void |
onElection(java.util.Map<java.lang.Integer,java.lang.Long> brokerEpochs)
Start-up the DataBalanceManager.
|
void |
onResignation()
When the broker ceases to be the primary DataBalancer in the cluster.
|
void |
scheduleBrokerRemoval(int brokerToRemove,
scala.Option<java.lang.Long> brokerToRemoveEpoch) |
void |
shutdown()
To be called when the KafkaDataBalanceManager is being fully shut down, rather
than temporarily disabled for later startup.
|
void |
updateConfig(kafka.server.KafkaConfig oldConfig,
kafka.server.KafkaConfig newConfig)
Updates the internal cruiseControl configuration based on dynamic property updates in the broker's KafkaConfig
|
public static final java.lang.String ACTIVE_BALANCER_COUNT_METRIC_NAME
public static final java.lang.String BROKER_REMOVAL_STATE_METRIC_NAME
public static final java.lang.String BROKER_ADDITION_STATE_METRIC_NAME
public KafkaDataBalanceManager(kafka.server.KafkaConfig kafkaConfig)
public static java.lang.Integer getBrokerId(kafka.server.KafkaConfig config)
public void onElection(java.util.Map<java.lang.Integer,java.lang.Long> brokerEpochs)
onElection
in interface kafka.controller.DataBalanceManager
public boolean isActive()
public void onResignation()
onResignation
in interface kafka.controller.DataBalanceManager
public void shutdown()
shutdown
in interface kafka.controller.DataBalanceManager
public void updateConfig(kafka.server.KafkaConfig oldConfig, kafka.server.KafkaConfig newConfig)
updateConfig
in interface kafka.controller.DataBalanceManager
public void onBrokersStartup(java.util.Set<java.lang.Integer> emptyBrokers, java.util.Set<java.lang.Integer> newBrokers)
onBrokersStartup
in interface kafka.controller.DataBalanceManager
public java.util.List<kafka.common.BrokerRemovalDescriptionInternal> brokerRemovals()
brokerRemovals
in interface kafka.controller.DataBalanceManager
public java.util.List<kafka.common.BrokerAdditionDescriptionInternal> brokerAdditions()
brokerAdditions
in interface kafka.controller.DataBalanceManager
public void scheduleBrokerRemoval(int brokerToRemove, scala.Option<java.lang.Long> brokerToRemoveEpoch)
scheduleBrokerRemoval
in interface kafka.controller.DataBalanceManager