您的位置:首页 > 其它

zookeeper单机部署的配置及简单健康检查

2017-01-07 10:29 411 查看
单机zoo.cfg配置----------------

# The number of milliseconds of each tick

tickTime=2000

# 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 directory where the snapshot is stored.

# do not use /tmp for storage, /tmp here is just 

# example sakes.

dataDir=/data/zookeeperdata

# the port at which the clients will connect

clientPort=2181

# the maximum number of client connections.

# increase this if you need to handle more clients

maxClientCnxns=10

crontab定时检测配置-------------

*/2 * * * * sh /root/script/startZK.sh

startZK.sh---------------------

if test $(pgrep -f zookeeper|wc -l) -eq 0

then

echo "zookeeper 未启动"

echo "zookeeper 启动中..."

cd /data/zookeeper/bin

./zkServer.sh start

echo "zookeeper 启动完成"

else

echo "zookeeper 已启动"

fi
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  zookeeper crontab