Zookeeper ~ Deployment in Linux, zookeeperlinux

Source: Internet
Author: User

Zookeeper ~ Deployment in Linux, zookeeperlinux
Introduction

ZooKeeper is a distributed, open-source distributed application Coordination Service. It is an open-source implementation of Google's Chubby and an important component of Hadoop and Hbase. It is a software that provides consistency services for distributed applications. It provides functions such as configuration maintenance, Domain Name Service, distributed synchronization, and group service.
The goal of ZooKeeper is to encapsulate key services that are complex and error-prone, and provide users with easy-to-use interfaces and systems with high performance and stable functions.
ZooKeeper contains a simple primitive set that provides Java and C interfaces.
ZooKeeper code version provides distributed exclusive lock, election, queue interface, code in the zookeeper-3.4.3 \ src \ recipes. The distribution locks and queues have Java and C versions, and only Java versions are selected.

 
 
Foreign Name
ZooKeeper
Class
Reliable coordination system for Distributed Systems
Subordinate
Official subproject of Hadoop
Special Points
Efficient and reliable
Principle

ZooKeeper is based on the Fast Paxos algorithm. The Paxos algorithm has a live lock problem. That is, when multiple proposer are submitted in a staggered manner, they may be mutually exclusive. As a result, no proposer can be submitted successfully, fast Paxos has made some optimizations. By selecting a leader, only the leader can submit the proposer. The specific algorithm can be seen in Fast Paxos. Therefore, to understand ZooKeeper, you must first understand Fast Paxos.
The basic operation process of ZooKeeper:
1. Select the Leader.
2. synchronize data.
3. There are many algorithms in the election Leader process, but the election standards to be met are consistent.
4. The Leader must have the highest execution ID, similar to the root permission.
5. Most machines in the cluster receive the response and select the Leader as follow.

Zookeeper is a coordinator.

Installation and deployment on Linux-centos

Download from the official website:

Http://zookeeper.apache.org/

Decompress:

Tar-xzvf zookeeper-3.5.2-alpha.tar.gz

Install JDK:

Yum install java-1.7.0-openjdk-src.x86_64

Configuration directory JAVA_HOME:

Vi/etc/profile. After opening the file, append the following content.

Export JAVA_HOME =/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9
Export CLASSPATH =.: $ JAVA_HOME/jre/lib/rt. jar: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export PATH = $ PATH: $ JAVA_HOME/bin

Run the zookeeper service:

Bin/zkServer. sh start conf/zoo. cfg

Result

 

Thank you for your support and technology. We will continue!

 

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.