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()
Returns the latest state for each broker being removed
|
kafka.common.EvenClusterLoadStatusDescriptionInternal |
evenClusterLoadStatus() |
DataBalanceEngine |
getBalanceEngine() |
kafka.server.KafkaConfig |
getKafkaConfig() |
boolean |
isActive() |
void |
onAlteredExclusions(Set<Integer> newExclusions,
Set<Integer> removedExclusions) |
void |
onBrokersFailure(Set<Integer> deadBrokers) |
void |
onBrokersStartup(Set<Integer> emptyBrokers,
Set<Integer> newBrokers,
kafka.common.AliveBrokersSnapshot brokersSnapshot) |
void |
onElection(kafka.common.AliveBrokersSnapshot aliveBrokersSnapshot)
Start-up the DataBalanceManager.
|
void |
onResignation()
When the broker ceases to be the primary DataBalancer in the cluster.
|
void |
scheduleBrokerRemoval(kafka.common.BrokerRemovalRequest removalRequest,
kafka.common.AliveBrokersSnapshot brokersSnapshot) |
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(kafka.common.AliveBrokersSnapshot aliveBrokersSnapshot)
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, kafka.common.AliveBrokersSnapshot brokersSnapshot)
onBrokersStartup
in interface kafka.controller.DataBalanceManager
public void onBrokersFailure(Set<Integer> deadBrokers)
onBrokersFailure
in interface kafka.controller.DataBalanceManager
public void onAlteredExclusions(Set<Integer> newExclusions, Set<Integer> removedExclusions)
onAlteredExclusions
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(kafka.common.BrokerRemovalRequest removalRequest, kafka.common.AliveBrokersSnapshot brokersSnapshot)
scheduleBrokerRemoval
in interface kafka.controller.DataBalanceManager
public DataBalanceEngine getBalanceEngine()
public kafka.server.KafkaConfig getKafkaConfig()