kafka-reassign-partitions.sh: move partition replicas between brokers
kafka-reassign-partitions.sh [options]
Options you will use
--bootstrap-server <String: server to connect to>- REQUIRED: the Kafka broker(s) to connect to, host:port[,host:port]. Give more than one: the first may be the broker that is down.
--generate- propose an assignment for --topics-to-move-json-file over --broker-list (changes nothing).
--topics-to-move-json-file <file>- {"version":1,"topics":[{"topic":"orders"}]}
--broker-list <String>- the brokers to spread over, 1,2,3,4.
--execute- start the reassignment in --reassignment-json-file.
--reassignment-json-file <file>- {"version":1,"partitions":[{"topic":..,"partition":..,"replicas":[..]}]}.
--throttle <Long: bytes/s>- limit the inter-broker copy rate (per broker).
--verify- report each partition's status; removes the throttles when all are done.
--list- the reassignments in progress.
--cancel- stop the moves in the file and restore the replica sets.
--additional- with --execute: change the throttle of a running reassignment.
Examples
$ kafka-reassign-partitions.sh --bootstrap-server kafka-1:9092 --reassignment-json-file plan.json --execute --throttle 20000000start, at 20 MB/s
$ kafka-reassign-partitions.sh --bootstrap-server kafka-1:9092 --reassignment-json-file plan.json --verifyprogress + throttle cleanup
Taught in
Try kafka-reassign-partitions.sh in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.