博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ZooKeeper 配置
阅读量:2392 次
发布时间:2019-05-10

本文共 1186 字,大约阅读时间需要 3 分钟。

# The number of milliseconds of each ticktickTime=2000# The number of ticks that the initial # synchronization phase can takeinitLimit=10# The number of ticks that can pass between # sending a request and getting an acknowledgementsyncLimit=5# the directory where the snapshot is stored.# do not use /tmp for storage, /tmp here is just # example sakes.dataDir=~/tmp/datadataLogDir=~/tmp/data# the port at which the clients will connectclientPort=2181## Be sure to read the maintenance section of the # administrator guide before turning on autopurge.## http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance## The number of snapshots to retain in dataDir#autopurge.snapRetainCount=3# Purge task interval in hours# Set to "0" to disable auto purge feature#autopurge.purgeInterval=1
参数 说明
tickTime 默认值3000,单位是ms,可以不配置,zk的最小单元的长度,很多运行时时隔都是使用tickTime的倍数来表示的,例如zk中会话最小超时时间默认是tickTime*2
dataDir 顾名思义就是 Zookeeper 保存数据的目录,默认情况下,Zookeeper 将写数据的日志文件也保存在这个目录里。
dataLogDir 顾名思义就是 Zookeeper 保存日志文件的目录
clientPort 这个端口就是客户端连接 Zookeeper 服务器的端口,Zookeeper 会监听这个端口,接受客户端的访问请求。

当这些配置项配置好后,你现在就可以启动 Zookeeper 了,启动后要检查 Zookeeper 是否已经在服务,可以通过 netstat – ano 命令查看是否有你配置的 clientPort 端口号在监听服务。

转载地址:http://wrqab.baihongyu.com/

你可能感兴趣的文章
poj 1308 Is It A Tree?
查看>>
poj 1611 The Suspects
查看>>
poj 3331 The Idiot of the Year Contest!
查看>>
poj 2413 How many Fibs?
查看>>
poj 3233 Matrix Power Series
查看>>
poj 3070 Fibonacci
查看>>
poj 1656 Counting Black
查看>>
BestCoder Round #28
查看>>
poj1845 Sumdiv
查看>>
poj3299 Humidex
查看>>
poj2159 Ancient Cipher
查看>>
poj1083 Moving Tables
查看>>
poj3006 Dirichlet's Theorem on Arithmetic Progressions
查看>>
poj2255 Tree Recovery
查看>>
二叉树的遍历
查看>>
poj3239 Solution to the n Queens Puzzle (n皇后问题)
查看>>
poj1047 Round and Round We Go
查看>>
poj1222 EXTENDED LIGHTS OUT
查看>>
poj1064 Cable master
查看>>
poj2864 Pascal Library
查看>>