Database Reference
In-Depth Information
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
The next parameter is the location of the ZooKeeper data directory. It
defaults to /tmp/zookeeper , but you should change it immediately as
most systems will discard data in the /tmp directory after some time. In this
example it has been set to /data/zookeeper . In all cases, the directory
and all of the files within it should be owned and writable by the user that
will be running the ZooKeeper server itself.
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just
# example sakes.
dataDir=/data/zookeeper
Despite the fact that ZooKeeper can only have a database as large as
available RAM, make sure that there is plenty of space available in the data
directory. ZooKeeper takes snapshots of the database along with logs of
changes between snapshots that are stored in this directory.
Finally, the port used by clients and other servers to communicate with the
server is specified:
# the port at which the clients will connect
clientPort=2181
There is no reason to change this port unless it happens to conflict with
another pre-existing service.
When the configuration is finished, create the data directory in the
appropriate location (such as /data/zookeeper ). In that directory, create
a file called myid that contains an integer that is unique to each ZooKeeper
server. This file serves to identify the server to the rest of the cluster and
ZooKeeper will not function without it. It should be assigned to a number
between 1 and 255 on each node in the quorum:
Search WWH ::




Custom Search