We are planning to expand cluster from 2 node to 8 node. The partition reassignment tool has the option to move topic or partition.
For re-distribution of partitions I am planning to follow the below steps.
Irrespective of number of node additions,If I give all the topics in the topic-to-move.json and all the brokers in the below command then it will give equal distribution of partition among nodes correct ?
 bin/kafka-reassign-partitions.sh --zookeeper localhost:2181 --topics-to-move-json-file topics-to-move.json --broker-list "0,1,2,3,4,5,6,7" --generate
After this I am planning to apply the json
--execute --reassignment-json-file generated-json file
Will this cause any problem ?
This step seems to be more general but why it is not documented this way?
There are few things to be aware of:
By passing the full topic list to the tool, all your partitions are likely to be reassigned.
In an already large cluster (> 1000s topics) this would cause a lot of unnecessary data copy and leader elections. So typically you would only provide a subset of your topics and only specify the new brokers as destinations to minimize the work required to complete the reassignment.
If your cluster is small enough and without GBs/TBs of data, passing all topics to the reassignment tool should be fine and it's probably the easiest/fastest.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With