Community Articles

Find and share helpful community-sourced technical articles.
Labels (1)
avatar
Community Manager

The Zookeeper transaction logs and Snapshots files are not human readable by default. Running a cat command on these files do not give clear information on the content of the files.

 

The following video explains how to read Zookeeper transaction logs and Snapshots?

 

Open the video on YouTube here

 

To view the content of these files, use the following:

To read the snapshots:

java -cp /usr/hdp/current/zookeeper-server/zookeeper.jar:/usr/hdp/current/zookeeper-server/lib/* 
org.apache.zookeeper.server.SnapshotFormatter <Snapshot file name>

To read the transaction logs:

java -cp /usr/hdp/current/zookeeper-server/zookeeper.jar:/usr/hdp/current/zookeeper-server/lib/* 
org.apache.zookeeper.server.LogFormatter <Log file name>

The classes that need to be used are located under /usr/hdp/current/zookeeper-server and /usr/hdp/current/zookeeper-server/lib.

2,018 Views
0 Kudos