Procedure to change zookeeper dataDir and dataLogDir:
=======================================
Symptoms: if you see "fsync write ahead log took long time" message in zookeeper logs or zookeeper client time out in zkfc,name node,hive,journal node...etc service logs then We should have dedicated disk for dataDir for batter zookeeper performance.
Steps to change Zookeeper directory.
1. Shutdown one Zookeeper at a time.
2. Copy the dataDir and dataLogDir data from current data into the new directory path.
3. Ensure that the ownership of the contents are still zookeeper:zookeeper
4. Update dataDir and dataLogDir path in /etc/zookeeper/conf/zoo.cfg file
vi /etc/zookeeper/conf/zoo.cfg
dataDir=
dataLogDir=
5. Start only the Zookeeper that was stopped in step 1.
6. Wait for it to become "FOLLOWER"
ex: checking usnig command echo stat | nc localhost 2181 | grep Mode
# echo stat | nc localhost 2181 | grep Mode
Mode: follower
7. Repeat the Steps for the other two Zookeeper hosts.
=======================================
Symptoms: if you see "fsync write ahead log took long time" message in zookeeper logs or zookeeper client time out in zkfc,name node,hive,journal node...etc service logs then We should have dedicated disk for dataDir for batter zookeeper performance.
Steps to change Zookeeper directory.
1. Shutdown one Zookeeper at a time.
2. Copy the dataDir and dataLogDir data from current data into the new directory path.
3. Ensure that the ownership of the contents are still zookeeper:zookeeper
4. Update dataDir and dataLogDir path in /etc/zookeeper/conf/zoo.cfg file
vi /etc/zookeeper/conf/zoo.cfg
dataDir=
dataLogDir=
5. Start only the Zookeeper that was stopped in step 1.
6. Wait for it to become "FOLLOWER"
ex: checking usnig command echo stat | nc localhost 2181 | grep Mode
# echo stat | nc localhost 2181 | grep Mode
Mode: follower
7. Repeat the Steps for the other two Zookeeper hosts.
No comments:
Post a Comment