In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What this article shares with you is about how to verify the high availability of kafka clusters. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Scenario 1: build a topic:mytopic with 3 partitions and 3 ReplicationFactor
Bin/kafka-topics.sh-- create-- zookeeper 192.168.135.130 partitions 2181192.168.135.129 zookeeper 2181192.168.135.131 partitions 2181-- partitions 3-- topic mytopic
Topic:mytopic PartitionCount:3 ReplicationFactor:3 Configs:
Topic: mytopic Partition: 0 Leader: 1 Replicas: 1,2,0 Isr: 1,2,0
Topic: mytopic Partition: 1 Leader: 2 Replicas: 2,0,1 Isr: 2,0,1
Topic: mytopic Partition: 2 Leader: 0 Replicas: 0,1,2 Isr: 0,1,2
If you hang up the No.1 node corresponding to partition 0, you can send messages normally.
Scenario 2: build a topic:yourtopic with 3 partitions and 1 ReplicationFactor
Bin/kafka-topics.sh-- create-- zookeeper 192.168.135.130 partitions 2181192.168.135.129 zookeeper 2181192.168.135.131Rose 2181-- replication-factor 1-- partitions 3-- topic yourtopic
Topic:yourtopic PartitionCount:3 ReplicationFactor:1 Configs:
Topic: yourtopic Partition: 0 Leader: 2 Replicas: 2 Isr: 2
Topic: yourtopic Partition: 1 Leader: 0 Replicas: 0 Isr: 0
Topic: yourtopic Partition: 2 Leader: 1 Replicas: 1 Isr: 1
If you hang up the No.2 node corresponding to partition 0, you will not be able to send a message normally. Error: Error: partition 0 does not have a leader. Skip getting offsets
The above is how to verify the high availability of kafka clusters. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.