In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Good programmer big data learning route of zookeeper practical information, last week to learn zookeeper, at first it is not easy to understand, and then with the deepening of learning, gradually understand a lot of knowledge, the following slowly introduce zookeeper.
What is zookeeper?
Zookeeper is a distributed coordination service, which provides coordination services for users' distributed applications.
Zookeeper provides services for other distributed programs
Zookeeper itself is a distributed program (services can be provided as long as more than half of the nodes survive)
Features of zookeeper:
Zookeeper: one leader, multiple follower
Global data consistency: each server saves the same data, and client can get the same data no matter which server it connects to.
Distributed read and write, update request forwarding, and data update write operation implemented by leader
Update requests are executed sequentially, and update requests from the same client are executed in the order in which they are sent.
The atomicity of data update, a data update is either successful or failed.
Real-time, in a certain time range, client can read the latest data.
Application scenarios:
Unified naming Service; configuration Management; Cluster Management; shared Lock; queue Management
As a sub-project of Hadoop project, Zookeeper is an indispensable module of Hadoop cluster management. It is mainly used to control the data in the cluster, such as managing NameNode in Hadoop cluster, and state synchronization between Master Election and Server in Hbase.
This article introduces the basic knowledge of Zookeeper, and introduces several typical application scenarios. These are the basic functions of Zookeeper. The most important thing is that Zoopkeeper provides a set of good distributed cluster management mechanism, which is the data structure based on hierarchical directory tree, and manages the nodes in the tree effectively, so that a variety of distributed data management models can be designed, not limited to the common application scenarios mentioned above.
Election mechanism:
1. Server ID: the larger the data ID (number), the greater the weight in the selection algorithm.
two。 Data ID: the maximum ID of the data stored in the server. The larger the value, the newer the data. In the election algorithm, the newer the data, the greater the weight.
3. Logical clock: that is, the number of votes, the logical clock in the same voting process is the same. After each vote, this data is added and different judgments are made according to different values compared with the values in the voting information returned by other servers.
Three major functions:
1. Provide users with data registration and query services
two。 Provide users with monitoring and registration services for data nodes
3. Maintain heartbeat communication with the user to perceive the user's state
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.