Kafka 动态调整副本数量
vim replication.json
{
"version": 1,
"partitions": [
{
"topic": "member_transfer", #topic
"partition": 0, #分区数量
"replicas": [ #新增副本数量 原有 121 新增 141、131
121,
141,
131
]
}
]
}
#执行新增命令
/usr/local/kafka/bin/kafka-reassign-partitions.sh --zookeeper localhost:2181 --reassignment-json-file replication.json --execute
# 查看topic详情
/usr/local/kafka/bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic member_transfer