Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The installation process of zookeeper

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "the installation process of zookeeper". In the operation of actual cases, many people will encounter such a dilemma, so 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!

X.1 introduction

ZooKeeper is a distributed, open source distributed application coordination service, 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, including configuration maintenance, name service, distributed synchronization, group service and so on. The goal of ZooKeeper is to encapsulate complex and error-prone key services and provide users with simple and easy-to-use interfaces and systems with efficient performance and stable functions. ZooKeeper is based on the Fast Paxos algorithm, and the paxos algorithm has a live lock on the ti, that is, when there are multiple proposer interlaced submissions, it is possible that no proposer can be submitted successfully due to mutual exclusion, while Fast Paxos has made some optimizations to generate a leader through election, and only leader can submit the propose.

X.2 installation

① is decompressed to the appropriate directory after downloading the appropriate gz package on the official website http://zookeeper.apache.org/releases.html (this an example uses zookeeper3.4.6, three nodes, cluster mode installation). Go to the confs subdirectory under the zookeeper directory, create the zoo.cfg file, and add the following parameters (for all nodes):

/ / heartbeat interval (in milliseconds)

TickTime=2000

/ / data directory

DataDir=/usr/lib/zookeeper346/dataInfo

/ / log directory

DataLogDir=/usr/lib/zookeeper346/logInfo

/ / listen on the port number of the client connection

ClientPort=2181

/ / the longest heartbeat time between follower and leader is 5*tickTime

InitLimit=5

/ / send messages between leader and follower. The maximum length of time to request and respond to da is 2*tickTime.

SyncLimit=2

/ / server.X=A:B:C, where X is a number, indicating which number server this is. An is the IP address where the server is located. B configure the port that the server uses to exchange messages with the leader in the cluster. C configure the port used to elect leader.

Server.1=192.168.100.7:2888:3889

Server.2=192.168.100.8:2888:3889

Server.3=192.168.100.2:2888:3889

② creates a myid file under the dataInfo of each node, and the myid contains only one number, X. For example, the myid content of the server.1 node is "1" and the myid content of the server.2 node is "2".

After the ① configuration is complete, use the. / zkServer.sh start command under $zookeeper_home / bin to start zookeeper.

② uses. / zkServer.sh status to view the current node identity after each node sees the QuorumPeerMain process. If the word Mode: leader appears on one node and the other node is Mode: follower, the installation is successful.

At this point, the Fault Tolerant Tachyon Cluster has been built.

This is the end of the content of "zookeeper installation process". Thank you for 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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report