In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what is the internal principle of zookeeper". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Zookeeper ① election mechanism (interview focus)
Half mechanism: more than half of the machines in the cluster survive and the cluster is available. So Zookeeper is suitable for installing odd-numbered servers.
Zookeeper although Master and Slave are not specified in the configuration file. However, when Zookeeper works, one node is Leader, and the other is that Follower,Leader is temporarily generated through an internal election mechanism.
The process of election:
For example, if there are three machines whose id is 1pd2, start them sequentially, and when the first one is turned on, the log of Zookeeper will report an error, because the number of starts is not half of the set: there are three machines with id for 1pd2, and start them sequentially. Started two, a total of three), the number is more than half, and then according to the size of the ID to choose Leader, then the 2nd is elected; 2.3.When the Leader already exists, you can only be a younger brother.
Principle of ② snooping (interview focus)
③ write data flow
The process by which the client writes data to the node of the zookeeper:
This is the end of the content of "what is the Internal principle of zookeeper". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.