Hadoop authoritative guide Study Notes ing (1)

Source: Internet
Author: User

1. zookeeper: highly available Distributed Coordination Service

Distributed difficulty lies in part of failure: In the process of message transmission, it is difficult to determine whether the receiver receives the message or not, so that three handshakes of the TCP protocol are available.

2. ZK instance

ZK can be regarded as a file system. This file system has only the concept of a node. znode can be regarded as a service, including a DB instance, thrift service, it can also be seen as a container for storing other services. All these znodes constitute a tree-type structure, and the basic ZK operations are performed on these nodes, including the create group, delete, add, and List Group members.

About znode: there are two different types, short and permanent, and temporarily maintained in a session where the client creates a group. When the session is disconnected, the znode ends, deleted by ZK, and permanent znode always exists

3. Each znode has an associated ACL. ZK is used to coordinate services rather than store data. The size of all znodes cannot exceed 1 MB, which is atomic for znode access.

You can specify a sequence number when creating a znode. znode with a sequence number can have the same name.

4. observation mechanism

When the znode node changes, you can notify other clients. For example, a client calls the zk's exists to check whether a znode exists in the current tree exists, and set an observation above, after other clients create this znode, they can notify the client. You can set observation (exists, getdata, getchildren) in the read operation and trigger observation (create, setdata, delete)

 

 

 

 

 

 

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.