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
上一篇:centos7.5+Ambari2.7.3部署安装


下一篇:/ bin / sh:/usr/jdk64/jdk1.7.0_45/bin/java:无法执行二进制文件