Kafkapartitions迁移-成都快上网建站

Kafkapartitions迁移

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|sed -ne '/Proposed partition reassignment configuration/,$p'|grep -v "Proposed partition reassignment configuration"

将结果保存到 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

分享名称:Kafkapartitions迁移
网站链接:http://kswjz.com/article/jcscps.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流