我们有6个节点的kafka集群。在这6台机器中,其中3台都装有Kafka + zookeeper,其余3台只有kafka。 最近,我们又添加了一个kafka节点。在将分区重新分配给所有节点(包括较新的节点)时,我们执行了以下命令:
/opt/kafka/bin/kafka-reassign-partitions.sh --reassignment-json-file new_assignment_details.json --execute --zookeeper localhost:2181
但是,当我们使用以下命令验证状态时,
/opt/kafka/bin/kafka-reassign-partitions.sh --reassignment-json-file new_assignment_details.json --verify --zookeeper localhost:2181
我们得到以下输出。一些分区的重新分配仍在进行中。
/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
没有办法做到这一点:
Kafka版本:0.10.1.1
平台:Amazon Linux 1 x86_64 GNU / Linux
有人可以帮我吗?
答案 0 :(得分:0)
您可以通过删除zk节点来取消正在进行的分区重新分配:delete / admin / reassign_partitions。 然后,您可以回滚或重新分配另一个json文件。