Zookeeper configurations
Let's assume you have installed Zookeeper on all three Zookeeper nodes; now we will walk you through the configurations so that you have a better understanding of them.
An excerpt from zoo.cfg
, in our case, is located at <zookeeper_installation_dir>/ zookeeper-3.4.5/conf/
. The Zookeeper configurations are as follows:
dataDir=/usr/local/zookeeper/tmp
: This is the path where Zookeeper stores its snapshots; these snapshots are actually the state log where the current cluster state is maintained for the purpose of coordination. In the event of a failure, these snapshots are used to restore the cluster to the last stable state. This directory also contains a file containing a single entry calledmyID
. This value starts from1
and is different for each Zookeeper node, so we will keep it as follows:zkp-1.mydomain.net – value of myId =1 zkp-2.mydomain.net – value of myId =2 zkp-3.mydomain.net – value of myId =3
Whenever you want to start from...