Hi Abhishek,

You can use fsck for this purpose

hadoop fsck <HDFS directory> -files -blocks -locations  --- Displays what you 
want

*------------------------*

Cheers !!!

Siddharth Tiwari

Have a refreshing day !!!
"Every duty is holy, and devotion to duty is the highest form of worship of 
God.” 

"Maybe other people will try to limit me but I don't limit myself"


From: [email protected]
Date: Fri, 24 Aug 2012 22:10:37 +0530
Subject: How do we view the blocks of a file in HDFS
To: [email protected]

hi,
   If I push a file into HDFS that runs on a 4 node cluster with 1 namenode and 
3 datanodes, how can I view where on the datanodes are the blocks of this 
file?I would like to view the blocks and their replicas individually. How can I 
do this?


The answer is very critical for my current task which is halted :) A detailed 
answer will be highly appreciated.Thank you!

With Regards,
Abhishek S

                                          

Reply via email to