We have 6 node kafka cluster. Out of the 6 machines, 3 of them have both Kafka + zookeeper, and the remaining 3 of them have just kafka. Recently, we added one more kafka node. While re-assigning the partition to all the nodes (including the newer one), we executed the below command:
/opt/kafka/bin/kafka-reassign-partitions.sh --reassignment-json-file new_assignment_details.json --execute --zookeeper localhost:2181
However, when we verified the status by using the below command,
/opt/kafka/bin/kafka-reassign-partitions.sh --reassignment-json-file new_assignment_details.json --verify --zookeeper localhost:2181
We get the below output. Some of the partitions are re-assignment is still in progress.
/opt/kafka/bin/kafka-reassign-partitions.sh --reassignment-json-file new_assignment_details.json --verify --zookeeper localhost:2181 | grep 'progress'
Reassignment of partition [topic-name,854] is still in progress
Reassignment of partition [topic-name,674] is still in progress
Reassignment of partition [topic-name,944] is still in progress
Reassignment of partition [topic-name,404] is still in progress
Reassignment of partition [topic-name,314] is still in progress
Reassignment of partition [topic-name,853] is still in progress
Reassignment of partition [prom-metrics,403] is still in progress
Reassignment of partition [prom-metrics,134] is still in progress
There is no way to either:
Kafka Version: 0.10.1.1
Platform: Amazon Linux 1 x86_64 GNU/Linux
Can anyone please help me out in this?
You can cancel the on-going partition re-assignment by deleting the zk node: delete /admin/reassign_partitions. Then you can rollback or reassign with another json file.
In my case, for canceling current partition re-assignment and being able to perform another re-assignment you should:
/admin/reassign_partitions
zk node/controller
zk node to re-elect the active controllerUPDATE
consider using --additional
argument of kafka-reassign-partitions.sh!
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