Review Board 1.7.22


automating log and snapshot cleaning

Review Request #1043 - Created July 7, 2011 and submitted

Patrick Hunt
trunk
ZOOKEEPER-1107
Reviewers
zookeeper
breed, mahadev, phunt
zookeeper
I like to have ZK itself manage the amount of snapshots and logs kept, instead of relying on the PurgeTxnLog utility.
test added, passing hudson qa bot.
./conf/zoo_sample.cfg
Revision 1149082 New Change
[20] 9 lines
[+20]
10
# do not use /tmp for storage, /tmp here is just 
10
# do not use /tmp for storage, /tmp here is just 
11
# example sakes.
11
# example sakes.
12
dataDir=/tmp/zookeeper
12
dataDir=/tmp/zookeeper
13
# the port at which the clients will connect
13
# the port at which the clients will connect
14
clientPort=2181
14
clientPort=2181

    
   
15
# The number of snapshots to retain in dataDir

    
   
16
#autopurge.snapRetainCount=3

    
   
17
# Purge task interval in hours

    
   
18
# Set to "0" to disable auto purge feature

    
   
19
#autopurge.purgeInterval=1
./src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml
Revision 1149082 New Change
 
./src/java/main/org/apache/zookeeper/server/DatadirCleanupManager.java
New File
 
./src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
Revision 1149082 New Change
 
./src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java
Revision 1149082 New Change
 
./src/java/test/org/apache/zookeeper/server/DatadirCleanupManagerTest.java
New File
 
  1. ./conf/zoo_sample.cfg: Loading...
  2. ./src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml: Loading...
  3. ./src/java/main/org/apache/zookeeper/server/DatadirCleanupManager.java: Loading...
  4. ./src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java: Loading...
  5. ./src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerMain.java: Loading...
  6. ./src/java/test/org/apache/zookeeper/server/DatadirCleanupManagerTest.java: Loading...