1、准备topics-to-move.json用于--topics-to-move-json-file
2、准备output.json用于--reassignment-json-file
3、
bin/kafka-reassign-partitions.sh --zookeeper 127.0.0.1:2181 --topics-to-move-json-file topics-to-move.json --broker-list "0,1,2" --generate > output.json
bin/kafka-reassign-partitions.sh --zookeeper 127.0.0.1:2181 --reassignment-json-file output.json --execute
网站标题:使用kafka-reassign-partitions.sh重新对topic分区,ReplicationFactor由1变成3
分享URL:
http://jkwzsj.com/article/phohih.html