no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


hdfs_fsck [2015/09/09 16:41] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== hdfs fsck ======
  
 +  * [[Hadoop]]
 +  * [[hdfs]]
 +
 +** Check the health of a file **
 +
 +<code>
 +hdfs fsck /user/root/sample.txt
 +</code>
 +
 +<code>
 +...
 +The filesystem under path '/user/root/sample.txt' is HEALTHY
 +</code>
 +
 +** Check the health of a file, and display the blocks as well **
 +
 +<code>
 +hdfs fsck /user/root/sample.txt -files -blocks
 +</code>
 +
 +<code>
 +...
 +/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
 +...
 +</code>
 +
 +** Check the health of a file, display the blocks, and which nodes the file is on **
 +
 +<code>
 +hdfs fsck /user/root/sample.txt -files -blocks -locations
 +</code>
 +
 +<code>
 +...
 +0. BP-1693696885-172.17.0.2-1441734712805:blk_1073742259_1435 len=2633979 repl=3 [172.17.0.2:50010, 172.17.0.3:50010, 172.17.0.4:50010]
 +...
 +</code>
 +
 +** Check the health of the entire filesystem **
 +
 +This must be run as user ''hdfs'' since ''root'' does not have full permissions.
 +
 +<code>
 +hdfs fsck /
 +</code>
 +
 +<code>
 +...
 +The filesystem under path '/' is HEALTHY
 +</code>

Navigation
QR Code
QR Code hdfs_fsck (generated for current page)