How to read fsimage
How to read fsimage:
We can use Offline Image Viewer tool to view the fsimage data in a human readable format. Sometimes, this becomes more essential to analyse the fsimage to understand the usage pattern, how many 0 bite files are created, what is the space consumption pattern and is the fsimage corrupt.
Donwload the fsimage: hdfs dfsadmin –fetchImage /fsimage
This will download the latest fsimage from Name node
16/12/27 05:40:43 INFO namenode.TransferFsImage: Opening connection to 
We can also get the output in JSON format by using curl: curl -i http://127.0.0.1:5978/webhdfs/v1/?op=liststatus

To get the output in to an output directory: hdfs ovi –p Delimited –i /fsimage/fsimage__0000000000000005792 –o /fsimage/fsimage.txt

We can read the data in fsimage.txt by running: head fsimage.txt from the local folder.


