In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Distributed coordination service ZooKeeper is how, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
Distributed coordination services are indispensable in distributed applications and usually play coordination roles, such as leader election, load balancing, service discovery, distributed queues and distributed locks.
Zookeeper data Model:
I. hierarchical namespaces
1. Data: each znode has a data field that records user data, and the data type of this node is a byte array.
2. Type:zonde type, which is divided into persistent (persistence node), ephemeral (temporary node), persistent_sequential (append a unique increment number after the persistence node), ephemeral_sequential (append an increment unique number after the temporary node)
3. The version number of the data in version:znode, which will be added each time the data is updated.
4. Children:znode can include multiple child nodes
5. ACL:znode access control list. Users can set the access user list for each znode to ensure that znode is safely accessed.
2. Watcher:watcher is a publish / subscribe mechanism provided by zookeeper. Users can register watcher on a znode to listen for its changes. Once the znode is deleted or updated, zookeeper will send the changes to the listener in the form of events. It should be noted that once wacther is triggered, it will be deleted unless the user registers the watcher again.
3. Session: it is the communication channel between the client and zookeeper. Messages in the same session are orderly, and Session is fault-tolerant. If there is server downtime, the client will automatically switch to other live services.
ZooKeeper basic architecture
Read path, write path, as a bridge between data centers, as a message bus.
ZooKeeper provides both Java and C language API
ZooKeeper application case:
Leader election (eg:Hbase, YARN, HDFS), distributed queue (to help Master nodes maintain jobs and worker information), load balancer: Kafka is the scenario, Broker and Customer mainly write information in Zookeeper, eg:Broker node registration information, Consumer registration information, Consumer Offset tracking information.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.