Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Labels (1)
avatar
Contributor

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.

3,370 Views
0 Kudos