kafka 重新分配leader kafka-preferred-replica-election.sh

bin/kafka-preferred-replica-election.sh --zookeeper hostzk/kafka-real

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}]}

相关推荐