public class KafkaDataBalanceManager extends Object implements kafka.controller.DataBalanceManager
Modifier and Type | Field and Description |
---|---|
static String |
ACTIVE_BALANCER_COUNT_METRIC_NAME |
static String |
BALANCER_STATE_METRIC_NAME |
static String |
BROKER_ADDITION_STATE_METRIC_NAME |
static String |
BROKER_REMOVAL_STATE_METRIC_NAME |
Constructor and Description |
---|
KafkaDataBalanceManager(kafka.server.KafkaConfig kafkaConfig)
Create a KafkaDataBalanceManager.
|
Modifier and Type | Method and Description |
---|---|
kafka.common.BalancerStatusDescriptionInternal |
balancerStatus() |
BalancerStatusTracker |
balancerStatusTracker() |
List<kafka.common.BrokerAdditionDescriptionInternal> |
brokerAdditions() |
List<kafka.common.BrokerRemovalDescriptionInternal> |
brokerRemovals() |
kafka.common.EvenClusterLoadStatusDescriptionInternal |
evenClusterLoadStatus() |
DataBalanceEngine |
getBalanceEngine() |
boolean |
isActive() |
void |
onBrokersFailure(Set<Integer> deadBrokers) |
void |
onBrokersStartup(Set<Integer> emptyBrokers,
Set<Integer> newBrokers) |
void |
onElection(Map<Integer,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<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 String ACTIVE_BALANCER_COUNT_METRIC_NAME
public static final String BROKER_REMOVAL_STATE_METRIC_NAME
public static final String BROKER_ADDITION_STATE_METRIC_NAME
public static final String BALANCER_STATE_METRIC_NAME
public KafkaDataBalanceManager(kafka.server.KafkaConfig kafkaConfig)
public void onElection(Map<Integer,Long> brokerEpochs)
onElection
in interface kafka.controller.DataBalanceManager
public boolean isActive()
public BalancerStatusTracker balancerStatusTracker()
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(Set<Integer> emptyBrokers, Set<Integer> newBrokers)
onBrokersStartup
in interface kafka.controller.DataBalanceManager
public void onBrokersFailure(Set<Integer> deadBrokers)
onBrokersFailure
in interface kafka.controller.DataBalanceManager
public List<kafka.common.BrokerRemovalDescriptionInternal> brokerRemovals()
brokerRemovals
in interface kafka.controller.DataBalanceManager
public List<kafka.common.BrokerAdditionDescriptionInternal> brokerAdditions()
brokerAdditions
in interface kafka.controller.DataBalanceManager
public kafka.common.BalancerStatusDescriptionInternal balancerStatus()
balancerStatus
in interface kafka.controller.DataBalanceManager
public kafka.common.EvenClusterLoadStatusDescriptionInternal evenClusterLoadStatus()
evenClusterLoadStatus
in interface kafka.controller.DataBalanceManager
public void scheduleBrokerRemoval(int brokerToRemove, scala.Option<Long> brokerToRemoveEpoch)
scheduleBrokerRemoval
in interface kafka.controller.DataBalanceManager
public DataBalanceEngine getBalanceEngine()