zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norbert Kalmar <nkal...@cloudera.com.INVALID>
Subject Re: Problem with ZK log files and snapshots
Date Wed, 18 Jul 2018 10:28:16 GMT
Hi,

You should use PurgeTxnLog as per
https://zookeeper.apache.org/doc/r3.4.8/zookeeperAdmin.html#sc_maintenance
It needs 3 parameters: txn log dir, smapshot dir and number of snaps/log to
keep (3 minimum!)

Example:
java -cp
zookeeper.jar:lib/slf4j-api-1.6.1.jar:lib/slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar:conf
org.apache.zookeeper.server.PurgeTxnLog /my/txn/log /my/snapshot/dir -n 3

A cronjob can handle the cleanup.

Or from 3.4.0 you can enavle it automatically: autopurge.snapRetainCount
and autopurge.purgeInterval
See
https://zookeeper.apache.org/doc/r3.4.8/zookeeperAdmin.html#sc_advancedConfiguration

Regards,
Norbert

On Wed, Jul 18, 2018 at 11:49 AM Jostein Elvaker Haande <jehaande@gmail.com>
wrote:

> Another thing I can't make heads or tails of, is whether or not it's safe
> to delete these transaction logs and snapshots manually.
>
> If yes, should this be done while ZooKeeper is stopped? Some of my
> instances are consuming quite a bit of disk space because of this issue,
> and to keep increasing disk space to "fix" the issue just isn't an option.
>
> --
> Yours sincerely Jostein Elvaker Haande
> "A free society is a society where it is safe to be unpopular"
> - Adlai Stevenson
>
> http://tolecnal.net -- tolecnal at tolecnal dot net
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message