In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to install and deploy ZooKeeper, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
1. Introduction of Zookeeper
Is a reliable coordination system for large-scale distributed systems; the functions include: configuration maintenance, name service, distributed synchronization, group services, etc.; the goal is to encapsulate complex and error-prone key jobs, and provide users with easy-to-use interfaces and systems with efficient performance and stable functions; Zookeeper has become a basic component in the Hadoop ecosystem.
II. Characteristics of Zookeeper
Ultimate consistency: show the client the same view, which is the most important performance of Zookeeper; reliability: if a message is accepted by one server, it will be accepted by all servers; atomicity: updates can only succeed or fail, without intermediate state
2.1 installation of Zookeeper
Zookeeper needs to be installed before JDK is installed. Configure the environment variables.
Download: zookeeper-3.4.5-cdh6.7.0.tar.gz
Decompression
Tar-zxvf zookeeper-3.4.5-cdh6.7.0.tar.gz-C ~ / app/
After decompressing, go to the zookeeper directory and find the conf directory, copy the configuration file and edit it.
Cp zoo_sample.cfg zoo.cfg vi zoo.cfg
Add the following to zoo.cfg
DataDir=/home/hadoop/app/zookeeper-3.4.5-cdh6.7.0/datadataLogDir=/home/hadoop/app/zookeeper-3.4.5-cdh6.7.0/logs
After configuration, enter the bin directory to run
. / zkServer.sh start
View running status
. / zkServer.sh statusJMX enabled by defaultUsing config: / home/hadoop/app/zookeeper-3.4.5-cdh6.7.0/bin/../conf/zoo.cfgMode: standalone
Stop running
. / zkServer.sh stopUsing config: / home/hadoop/app/zookeeper-3.4.5-cdh6.7.0/bin/../conf/zoo.cfgStopping zookeeper... STOPPED
2.2 zoo.cfg configuration
TickTime: the unit of time used for computing, such as session timeout: N* tickTime ·initLimit: for clusters, the initial connection time that allows slave nodes to connect and synchronize to master nodes, expressed in multiples of tickTime: syncLimit: for clusters, the length of request and reply time for sending messages between master master and slave nodes. (heartbeat mechanism) dataDir: dataLogDir: log directory must be configured. If not, it will share clientPort with dataDir: the port to connect to the server. Default is 2181.
2.3 Zookeeper main directory structure
Some of bin's main running commands, conf, store the configuration file, in which what needs to be modified is zk.cfg ·contrib: additional functions dist-maven: mvn compiled directory docs: documentation lib: jar package to rely on recipes: case demo code src: source code
Thank you for reading this article carefully. I hope the article "how to install and deploy ZooKeeper" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.