ZooKeeper is a distributed, open-source coordination service for distributed applications. It exposes a simple set of primitives that distributed applications can build upon to implement higher level services for synchronization, configuration maintenance, and groups and naming.
It is designed to be easy to program to, and uses a data model styled after the familiar directory tree structure of file systems. It runs in Java and has bindings for both Java and C.
ZooKeeper Service |
Get Source Code
...
sudo apt-get install graphviz
Ant: Apache Ant(TM) version 1.9.6
Building Zookeeper
...
on AArch64
Modify the config file: build.xml
--- a/build.xml +++ b/build.xml @@ -40,8 +40,8 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant"> <property name="revision.properties" value="revision.properties" /> <property file="${basedir}/src/java/${revision.properties}" /> - <property name="javac.target" value="1.7" /> - <property name="javac.source" value="1.7" /> + <property name="javac.target" value="1.8" /> + <property name="javac.source" value="1.8" /> <property name="build.encoding" value="utf8" /> |
---|
Building & UT using ant
$ ant $ ant -Djavac.args="-Xlint -Xmaxwarns 1000 " clean test tar |
---|
ja
Configuration
To start ZooKeeper we need a configuration file. Here is a sample, create it in conf/zoo.cfg:
tickTime=2000 dataDir=/var/lib/zookeeper clientPort=2181 |
---|
tickTime
the basic time unit in milliseconds used by ZooKeeper. It is used to do heartbeats and the minimum session timeout will be twice the tickTime.
...
the port to listen for client connections
Start ZooKeeper:
$ bin/zkServer.sh start ZooKeeper JMX enabled by default |
---|
From JPS, it is noted that zookeeper is running on AArch64 Server :.
$ jps 20351 ZooKeeperMain |
---|