1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| vim xxx.json {"version":1, "partitions":[ {"topic":"<topic-name>","partition":0,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":1,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":2,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":3,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":4,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":5,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":6,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":7,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":8,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":9,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":10,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":11,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":12,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":13,"replicas":[0,1,2]}, {"topic":"<topic-name>","partition":14,"replicas":[0,1,2]} ]} kafka-reassign-partitions.sh --zookeeper xxx:2181 --reassignment-json-file xxx.json --execute
|