一 .修改Kafka Topic副本数
1.bin/kafka-topics.sh --zookeeper gw04:2181,gw05:2181,gw06:2181 --create --partitions 3 --replication-factor 3 --topic bms_clean_dwm_es11_yb
##新建测试topic bms_clean_dwm_es11_yb
2.bin/kafka-topics.sh --zookeeper gw04:2181,gw05:2181,gw06:2181 --topic bms_clean_dwm_es11_yb --describe ##查看Topic详情如下:
Topic:bms_clean_dwm_es11_yb PartitionCount:3 ReplicationFactor:3 Configs:
Topic: bms_clean_dwm_es11_yb Partition: 0 Leader: 49 Replicas: 49,48,47 Isr: 49,48,47
Topic: bms_clean_dwm_es11_yb Partition: 1 Leader: 48 Replicas: 48,47,49 Isr: 48,47,49
Topic: bms_clean_dwm_es11_yb Partition: 2 Leader: 47 Replicas: 47,49,48 Isr: 47,49,48
3.cat << EOF > increase-replication-factor.json
{“version”:1,
“partitions”:[
{“topic”:“bms_clean_dwm_es11_yb”,“partition”:0,“replicas”:[47]},
{“topic”:“bms_clean_dwm_es11_yb”,“partition”:1,“replicas”:[48]},
{“topic”:“bms_clean_dwm_es11_yb”,“par
版权归原作者 海水孤独 所有, 如有侵权,请联系我们删除。