kafka手动均衡leader
kafka-preferred-replica-election
用于对Leader进行重新负载均衡
用法1: 触发对所有的topic Leader进行负载均衡
bin/kafka-preferred-replica-election.sh --zookeeper localhost:2181/chroot
用法2: 对某个topic Leader触发负载均衡
bin/kafka-preferred-replica-election.sh --zookeeper localhost:2181 --path-to-json-file election.json
election.json
{"partitions":
[{"topic": "flink_clickhouse", "partition": 0},
{"topic": "flink_clickhouse", "partition": 1}]
}
修改配置文件 server.properties
auto.leader.rebalance.enable=true
实现topic Leader的自动负载均衡
kafka手动均衡leader
https://www.hechunyu.com/archives/1698219200175