Brief introduction
Zookeeper is a distributed, open source distributed application Coordination Service that is an open source implementation of Google's chubby and an important component of Hadoop and HBase. It is a software that provides consistent services for distributed applications, including configuration maintenance, domain name services, distributed synchronization, group services, and so on.
The goal of zookeeper is to encapsulate complex and error-prone services that provide users with easy-to-use interfaces and performance-efficient, robust systems.
The zookeeper contains a simple set of primitives that provide both Java and C interfaces.
The Zookeeper code version provides a distributed, exclusive lock, election, queue interface, and the code is zookeeper-3.4.8\src\recipes. Where the distribution locks and queues have Java and C two versions, the election is only Java version.
Download Apache official address: http://mirrors.cnnic.cn/apache/zookeeper/
Then unzip the package into the file directory, you can see
Go to the Conf directory and rename the. cfg file to zoo.cfg.
# The directory where the snapshot is stored.
# do not use/tmp for storage,/tmp here are just
# example Sakes.
Datadir=f:\\soft\\zookeeper-3.4.6\\data
Datalogdir=f:\\soft\\zookeeper-3.4.6\\log
#dataDir =/tmp/zookeeper
You can see that two lines are added from the code above. In this machine. Zookeeper is placed in the F-disk, and then added the DataDir and datalogdir two variables. At the same time in the Zookeeper file directory to create a new data and log two folders, if not created, the script will be run after the error.
When you are done, go to the bin directory and run the Zkserver.cmd script so that you can run zookeeper on a single machine.
Installation and operation of zookeeper under WINDOW7 environment