zookeeper 日志清除机制
来源:互联网 发布:打印机软件怎么安装 编辑:程序博客网 时间:2024/05/16 10:13
在使用zookeeper中会生成大量的日志信息和快照数据,若定期不清理会导致磁盘占盘,从而影响服务的正常运行。目前版本的zookeeper 有提供参数用于清理日志文件(log)和快照文件(snapshot)。
zoo.cfg文件
# 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=/home/ekanet/esb/zookeeper-3.4.6/data# the port at which the clients will connectclientPort=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 dataDirautopurge.snapRetainCount=20# Purge task interval in hours# Set to "0" to disable auto purge feature autopurge.purgeInterval=5server.1=zk-server-01:2888:3888server.2=zk-server-02:2888:3888server.3=zk-server-03:2888:3888
autopurge.purgeInterval=5
autopurge.snapRetainCount=20
上面设置的参数表示:间隔5个小时清理一次,log文件保存20个,snapshot快照文件保存20个。若zookeeper启动时超过设置的文件时,就会执行删除文件的操作。
间隔5个小时会执行清理日志的定时任务,删除log和快照超过设定值的文件。
阅读全文
0 0
- zookeeper 日志清除机制
- 清除日志
- 清除日志
- zookeeper清除快照命令
- 清除日志和收缩日志
- 清除 SQL Server 日志
- 清除Sql日志
- 清除数据库日志
- 数据库日志清除
- ms sql清除日志
- sybase自动清除日志
- 3389登录日志清除
- sybase 自动清除日志
- 清除系统日志
- 清除数据库日志
- 怎么清除sqlserver日志
- SQLServer 清除日志
- 清除linux日志
- 让你的App支持emoji
- 在webstorm中如何关联github项目
- 低版本的兼容性问题
- unity3d在菜单栏,一键设置Player setting及自动打包并设置apk的存储位置
- Android安全之制作system方法
- zookeeper 日志清除机制
- spring,mybatis整合报错Result Maps collection already contains value for ...BaseResultM
- 类圆颗粒分割与识别
- css 实现 section(块) 的左右滑动,以及块内文字居中的效果
- Tensorflow读取数据的4种方式(8)---《深度学习》
- MongoDb初探(一):windows下MongoDB的安装及配置
- java语言体系
- 已知randx构造randx+n
- 如何优化web服务器以实现高吞吐量和低延迟