Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-252

PurgeTxnLog is not handling the new dataDir directory structure



    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 3.0.1
    • Fix Version/s: 3.1.0
    • Component/s: server
    • Labels:
    • Hadoop Flags:


      org.apache.zookeeper.server.PurgeTxnLog class has not been updated to handle the new directory structure imposed by the upgrade from v2 to v3 of ZooKeeper. In particular the dataDir now has a "version-2" subdirectory that stores all of the snaps/transactionallogs for version2 of the persistence layer.

      I also note that the documentation of this class is particularly poor. I'm working on ZOOKEEPER-229 and would like to point to the API docs for this class regarding usage but they api docs are nonexistent

      Also - I think it's important for the user to be able to specify the number of "backup" snaps and logs that should be kept – right now it seems we delete all but the current snaps/txlogs. Either by count or by date – ie "remove anything 5 days or older, with a minum of 3 most recents snaps (and accompanying txlogs)" seems like a pretty common user case (assuming the operator is doing system backups every X days, etc...)

      in general this class needs some tlc - the formatting should also be cleaned up.

      Also - the API docs for this and LogFormatter are not included in the build.xml "javadoc" target. These are user utilities so javadoc for these two classes should be included. I will fix this issue as part of ZOOKEEPER-229. I'm also updateing the forrest documention in 229 so don't worry about that either.


        1. ZOOKEEPER-252.patch
          5 kB
          Mahadev Konar
        2. ZOOKEEPER-252.patch
          5 kB
          Mahadev Konar
        3. ZOOKEEPER-252.patch
          5 kB
          Mahadev Konar
        4. ZOOKEEPER-252.patch
          10 kB
          Mahadev Konar

          Issue Links



              • Assignee:
                mahadev Mahadev Konar
                phunt Patrick D. Hunt
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: