zookeeper快照清理
从3.4版本以后,在配置文件中有2个参数分别设置快照的清理。默认没有打开。
autopurge.purgeInterval=1 这个参数指定了清理频率,单位是小时,需要填写一个1或更大的整数,默认是0,表示不开启自己清理功能
autopurge.snapRetainCount=3 这个参数和上面的参数搭配使用,这个参数指定了需要保留的文件数目。默认是保留3个。 还有一种方法,系统提供了zkCleanup.sh脚本,执行该脚本也可以手工清理。
# 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/zkdata
dataLogDir=/data/zookeeper/zkdatalog # the port at which the clients will connect
clientPort=2181 #171102
server.1=10.15.201.83:2888:3888
server.2=10.15.201.84:2888:3888
server.3=10.15.201.85:2888:3888 # 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=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
autopurge.purgeInterval=1
zookeeper快照清理的更多相关文章
- zookeeper定时清理log
在zookeeper的目录下新建一个脚本,内容如下(zookeeper bin下面也有zkCleanup.sh脚本,原理一样,都是调用java类) shell_dir=$(cd ")&quo ...
- zookeeper日志清理
环境 Red Hat Enterprise Linux Server release 7.3 (Maipo) jdk1.7.0_80 zookeeper-3.4.11 一.事务日志和快照日志 ...
- zookeeper 事务日志与快照日志
zookeeper日志各类日志简介 zookeeper服务器会产生三类日志:事务日志.快照日志和log4j日志. 在zookeeper默认配置文件zoo.cfg(可以修改文件名)中有一个配置项data ...
- ZooKeepr日志清理【转】
转自 :@ni掌柜nileader@gmail.com 地址 数据文件管理 默认情况下,ZK的数据文件和事务日志是保存在同一个目录中,建议是将事务日志存储到单独的磁盘上. 1 数据目录 ZK的数据目录 ...
- zookeeper 用法和日常运维
本文以ZooKeeper3.4.3版本的官方指南为基础:http://zookeeper.apache.org/doc/r3.4.3/zookeeperAdmin.html,补充一些作者运维实践中的要 ...
- 部署与管理ZooKeeper(转)
本文以ZooKeeper3.4.3版本的官方指南为基础:http://zookeeper.apache.org/doc/r3.4.3/zookeeperAdmin.html,补充一些作者运维实践中的要 ...
- Zookeeper分布式服务协调组件
1.简介 Zookeeper是一个分布式服务协调组件,是Hadoop.Hbase.Kafka的重要组件,它是一个为分布式应用提供一致性服务的组件. Zookeeper的目标就是封装好复杂易出错的服 ...
- 部署与管理ZooKeeper(版本有点老,3.4.3)
本文以ZooKeeper3.4.3版本的官方指南为基础:http://zookeeper.apache.org/doc/r3.4.3/zookeeperAdmin.html,补充一些作者运维实践中的要 ...
- Centos6下zookeeper集群部署记录
ZooKeeper是一个开放源码的分布式应用程序协调服务,它包含一个简单的原语集,分布式应用程序可以基于它实现同步服务,配置维护和命名服务等. Zookeeper设计目的 最终一致性:client不论 ...
随机推荐
- json解析为泛型对象
一.方法 public <T> T jsonToObjByType(String str, Type type) { try { if (isValidJson(str)) { retur ...
- spring 下载
Spring官网(https://spring.io/)改版后,直接下载Jar包的链接,下面汇总 1.直接输入地址,改相应版本即可:http://repo.springsource.org/libs- ...
- Android Developers:绘制9-patch图片
绘制9-patch图片工具让你使用可见即可得(WYSIWYG)编辑器轻松创建Nine Patch图像. 关于介绍Nine-path图片和它是如何工作的,请在2D Graphics的文档中查阅关于Nin ...
- postman发送post数据到node.js中
使用get请求我们很容易的来利用postman来发送数据,但是今天的express在使用postman进行post请求的时候,竟然解析的body是空对象.在网上找了一下果然有解决方法,如下: 因为是P ...
- haproxy+keepalived配置haproxy反向代理的高可用
http://www.cnblogs.com/shantu/p/4586277.html
- php分享十八七:mysql基础
mysql操作数据库代码: $link = @mysql_connect('localhost:3306', 'root', 'root') or die(mysql_error()); mysql_ ...
- javascript 获取函数形参个数
分享下javascript获取函数形参个数的方法. /** * 获取函数的形参个数 * @param {Function} func [要获取的函数] * @return {*} [形参的数组或und ...
- 2.2 Apache Axis2 快速学习手册之 AXIOM 构建 Web Service
和上一篇的POJO 部署相比主要是services.xml 中配置的消息接受处理器类不一样和Java 类中写法不一样. 使用AXIOM构建服务 样例源码路径: C:\Apps\axis2\axis2- ...
- 不应直接存储或返回可变成员 Mutable members should not be stored or returned directly
Mutable objects are those whose state can be changed. For instance, an array is mutable, but a Strin ...
- IOS 实现录音PCM转MP3格式(边录音边转码)
最近做的一个项目,项目中有个录音功能,采用的录音方法是IOS下的AVAudioRecorder.录音效果不错,但是录制的原生.pcm文件太大,每分钟大约10M左右. 找了下相关的音频压缩方法,用spe ...