Kafka partitions 迁移
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Kafka partitions 迁移相关的知识,希望对你有一定的参考价值。
echo ‘"topics":["topic": "test1","topic":"test2"], "version":1‘ >ready-move-topics.json
/usr/hdp/current/kafka-broker/bin/kafka-reassign-partitions.sh --zookeeper agent01.ambari.com:2181,agent02.ambari.com:2181,server.ambari.com:2181/kafka --topics-to-move-json-file ready-move-topics.json --broker-list "1001,1002" --generate
将结果保存到 relayout-partitions.json 文件中
/usr/hdp/current/kafka-broker/bin/kafka-reassign-partitions.sh --zookeeper agent01.ambari.com:2181,agent02.ambari.com:2181,server.ambari.com:2181/kafka --reassignment-json-file relayout-partitions.json --execute
/usr/hdp/current/kafka-broker/bin/kafka-reassign-partitions.sh --zookeeper agent01.ambari.com:2181,agent02.ambari.com:2181,server.ambari.com:2181/kafka --reassignment-json-file relayout-partitions.json --verify
以上是关于Kafka partitions 迁移的主要内容,如果未能解决你的问题,请参考以下文章
Kafka partition 副本迁移与broker上下线
【kafka】kafka理论之partition & replication