Installation under Windows ZooKeeper

ZooKeeper:

ZooKeeper is a distributed, open-source coordination service for distributed applications, is an open source implementation of Google's Chubby, is a key component of Hadoop and Hbase. It is to provide a consistent service for distributed applications, provides features include: service registration, discovery, configuration maintenance, distributed synchronization, group services.

download link:

Apache ZooKeeper official website: HTTPS: // zookeeper.apache.org/releases.html#download

To download

Select the corresponding version

Download archive

Installation, unpack the archive to a directory

Copy zoo_sample.cfg file: zoo.cfg

Zoo.cfg modify configuration files, build an empty data in the installation directory, logs folder)

Some parameters introduced

tickTime: This time is maintained as a heartbeat Zookeeper between client and server, or server time interval (in milliseconds), i.e. each time tickTime sends a heartbeat.
How much time can stand up to this configuration item is used to configure Zookeeper accept client (here the client is not connected to the user client server Zookeeper, Zookeeper but a cluster of servers connected to the Leader of the Follower server) initialize the connection: initLimit heartbeat number of intervals. When you have more than 10 heartbeat time (that is, tickTime) the length Zookeeper server has not received client-side return information, it indicates that the client connection fails. The total length of time is 10 * 2000 = 20 sec
syncLimit: sending messages between the configuration item identifier Leader and Follower, request and response time length, the length of the longest number tickTime not exceed, the total length of time is 5 * 2000 = 10 seconds
dataDir: Zookeeper name suggests is to save the data directory, by default, the log file Zookeeper write data is also stored in this directory.

dataLogDir: service log file
clientPort: This port is the port the client server connection Zookeeper, Zookeeper listens to this port, interview the client's request.

Start zook service in the bin directory zkServer.cmd default listening port 2181

 

If you encounter Error ZooKeeper: JAVA_HOME IS not the SET questions:

Please note that the system environment variable is set to JAVA_HOME and additional attention to key in the path

No java and install your own Baidu

Client connections zkCli.cmd

 connection succeeded

 

 

Published 37 original articles · won praise 2 · Views 3096

Guess you like

Origin blog.csdn.net/weixin_41406041/article/details/100571609