Database Reference
In-Depth Information
◦
syncLimit
: This is the number of ticks that can pass between sending
a request and getting an acknowledgement (for example, 2).
◦
dataDir
: This is the directory where the snapshot is stored (for ex-
ample,
/usr/local/zookeeper/tmp
).
◦
clientPort
: This is the port at which the Zookeeper clients will con-
nect to the port (for example, 2182).
◦
server.id=host:port:port
: Every machine that is part of the
Zookeeper ensemble should know about every other machine in the en-
semble. This is accomplished with the series of lines of the
serv-
er.id=host:port:port
form (for example,
serv-
er.1:<IP_ADDRESS_OF_ZOOKEEPER_NODE_1>:2888:3888
).
6. Repeat the preceding steps or copy the distribution to other machines that will be
part of the Zookeeper cluster.
7. Create a file with the name
myid
in the directory specified by the
datadir
property. The
myid
file consists of a single line containing only the text of that
machine's ID (1 in the server and 1 in
zoo.cfg
). So,
myid
of server 1 will con-
tain the text
1
and nothing else. The ID must be unique within the ensemble and
should have a value between 1 and 255. The path of the
myid
file in this case is
vi /usr/local/zookeeper/tmp/myid
.
8. Edit the
~/.bashrc
file and add an environment variable for the Zookeeper
home and add its bin directory to the
PATH
environment variable:
9. Source the
~/
.
bashrc
file after making changes. This step is required to make
sure that the changes that are made to
bashrc
are applied to the current terminal
session:
Search WWH ::
Custom Search