public interface ClusterBalanceManager
extends org.apache.kafka.image.MetadataImageListener
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Modifier and Type | Method and Description |
---|---|
BalancerStatusDescriptionInternal |
balancerStatus() |
List<BrokerAdditionDescriptionInternal> |
brokerAdditions() |
List<BrokerRemovalDescriptionInternal> |
brokerRemovals() |
static ClusterBalanceManager |
clusterBalanceManager(kafka.server.KafkaConfig config)
Instantiate the ClusterBalanceManager based on the config
|
EvenClusterLoadStatusDescriptionInternal |
evenClusterLoadStatus()
Return status of the goal violation detector triggered self balancing.
|
void |
onAlteredExclusions(Set<Integer> newExclusions,
Set<Integer> removedExclusions)
Notify the data balance manager of alterations in the set of active broker replica exclusions
|
void |
onBrokerLeadershipPriorityChange(boolean demotedBrokersExist)
Notify the data balance manager when the broker leadership priority changes.
|
void |
onBrokersFailure(Set<Integer> deadBrokers)
Notify the balancer manager of brokers that are dead, either because they are shutdown or because
they are not known to controller anymore (no heartbeat).
|
void |
onBrokersStartup(Set<Integer> emptyBrokers,
Set<Integer> newBrokers,
AliveBrokersSnapshot aliveBrokersSnapshot)
Notify the balance manager of newly-started brokers for it to take action on the event
(e.g schedule a broker add operation or cancel an ongoing broker removal)
|
void |
scheduleBrokerRemoval(BrokerRemovalRequest removalRequest,
AliveBrokersSnapshot aliveBrokersSnapshot)
Schedule a broker removal operation
|
void |
shutdown()
Notify node shutdown
|
void |
triggerEvenClusterLoadTask()
Serves manual request to run a general rebalance on the cluster for the even cluster load
task.
|
void shutdown()
void scheduleBrokerRemoval(BrokerRemovalRequest removalRequest, AliveBrokersSnapshot aliveBrokersSnapshot)
removalRequest
- information related to the request of removing the brokersaliveBrokersSnapshot
- a snapshot of the live brokers in the clustervoid onBrokersStartup(Set<Integer> emptyBrokers, Set<Integer> newBrokers, AliveBrokersSnapshot aliveBrokersSnapshot)
emptyBrokers
- - the set of broker IDs that have just started up and contain no replicas on themnewBrokers
- - a superset of `emptyBrokers`, this contains all the brokers that have just started upaliveBrokersSnapshot
- a metadata snapshot of the brokers in the cluster that are onlinevoid onBrokersFailure(Set<Integer> deadBrokers)
deadBrokers
- - the set of brokers that have been identified as failingvoid onAlteredExclusions(Set<Integer> newExclusions, Set<Integer> removedExclusions)
List<BrokerRemovalDescriptionInternal> brokerRemovals()
List<BrokerAdditionDescriptionInternal> brokerAdditions()
BalancerStatusDescriptionInternal balancerStatus()
EvenClusterLoadStatusDescriptionInternal evenClusterLoadStatus()
void triggerEvenClusterLoadTask()
void onBrokerLeadershipPriorityChange(boolean demotedBrokersExist)
demotedBrokersExist
- static ClusterBalanceManager clusterBalanceManager(kafka.server.KafkaConfig config)
config
- The KafkaConfig used to start up this serverNoOpClusterBalanceManager
otherwise.