新聞中心
一、描述
創(chuàng)新互聯(lián)建站專注于企業(yè)全網(wǎng)營銷推廣、網(wǎng)站重做改版、膠州網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、HTML5建站、商城系統(tǒng)網(wǎng)站開發(fā)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)營銷網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計(jì)等建站業(yè)務(wù),價格優(yōu)惠性價比高,為膠州等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。
大早上剛到公司就發(fā)現(xiàn)報(bào)警,磁盤容量告警,zookeeper集群服務(wù)器報(bào)警。
二、處理過程
查看磁盤空間
df -h
2.確認(rèn)那個目錄占用空間比較多,發(fā)現(xiàn)是zookeeper
修改zookeeper參數(shù)文件(版本3.4.6)
vi zoo.cfg
# The number of snapshots to retain in dataDir
autopurge.snapRetainCount=20 #保留log和snapshot各20個
# Purge task interval in hours
# Set to "0" to disable auto purge feature
autopurge.purgeInterval=1 #每小時清理一次
3.查看狀態(tài)
$ /usr/local/RoilandGroup/zookeeper/bin/zkServer.sh status
JMX enabled by default
Using config: /usr/local/RoilandGroup/zookeeper/bin/../conf/zoo.cfg
Mode: leader
4.關(guān)閉服務(wù)
$ /usr/local/RoilandGroup/zookeeper/bin/zkServer.sh stop
JMX enabled by default
Using config: /usr/local/RoilandGroup/zookeeper/bin/../conf/zoo.cfg
Stopping zookeeper ... STOPPED
5.重啟服務(wù)
$ /usr/local/RoilandGroup/zookeeper/bin/zkServer.sh start
JMX enabled by default
Using config: /usr/local/RoilandGroup/zookeeper/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[hadoop@host-10-60-40-37 conf]$ jps
8118449 QuorumPeerMain
6.zookeeper集群中每一個節(jié)點(diǎn)都需要修改參數(shù)文件,然后重啟服務(wù).
至于為什么這么修改,是否還有其他的方式,大家可以看官方文檔,或者比較懶就百度。
7.理解每一個參數(shù)文件,看注釋就行
less 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/zookeeper
# 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=60
#
# 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=20
# Purge task interval in hours
# Set to "0" to disable auto purge feature
autopurge.purgeInterval=1
#####################################################
#####################################################
#####################################################
server.1=10.10.10.11:2888:3888
server.2=10.10.10.12:2888:3888
server.3=10.10.10.13:2888:3888
server.4=10.10.10.14:2888:3888
server.5=10.10.10.15:2888:3888
當(dāng)前文章:zookeeper清理日志
URL鏈接:http://www.dlmjj.cn/article/gcidsp.html