kafka-preferred-replica-election
2020-02-20 本文已影响0人
wuhuaguo丶
该命令是对leader进行重新负载均衡
用法:
bin/kafka-preferred-replica-election.sh --zookeeper localhost:12913/kafka --path-to-json-file topicPartitionList.json
topicPartitionList.json内容:
{
"partitions": [
{
"topic": "topic",
"partition": 0
},
{
"topic": "topic",
"partition": 1
},
{
"topic": "topic",
"partition": 2
},
{
"topic": "topic",
"partition": 3
},
{
"topic": "topic",
"partition": 4
},
{
"topic": "topic",
"partition": 5
},
{
"topic": "topic",
"partition": 6
},
{
"topic": "topic",
"partition": 7
}
]
}