This is an old revision of the document!


hdfs fsck

Check the health of a file

hdfs fsck /user/root/sample.txt
...
The filesystem under path '/user/root/sample.txt' is HEALTHY

Check the health of a file, and display the blocks as well

hdfs fsck /user/root/sample.txt -files -blocks
...
/user/root/sample.txt 2633979 bytes, 1 block(s):  OK
0. BP-1693696885-172.17.0.2-1441734712805:blk_1073742259_1435 len=2633979 repl=3
...