英文:
How to change min insync replica for multiple topics at once using kafka-config.sh (or any other kafka cli script)
问题
我想要修改多个Kafka主题的最小同步副本属性。
对于单个主题,我知道我们可以使用以下命令:
kafka-configs --alter --entity-type topics --entity-name <topic name> --add-config min.insync.replicas=2 --zookeeper <zookeeper node:port>
如何将多个实体名称传递给此命令?或者是否有其他通过shell来完成的方法,还是我需要编写一个自定义脚本来实现?
英文:
I want to change the min insync replica property for multiple kafka topics.
For individual topics, I know we can use this:
kafka-configs --alter --entity-type topics --entity-name <topic name> --add-config min.insync.replicas=2 --zookeeper <zookeeper node:port>
How do I pass multiple entity names to this command? Or is there any other way to do it via shell, or will I have to write a custom script to do so?
答案1
得分: 2
The command doesn't accept mutiple topics. You'll need to use bash, awk, or other language you're familiar with.
英文:
The command doesn't accept mutiple topics. You'll need to use bash, awk, or other language you're familiar with
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论