This has been asked before: http://search-hadoop.com/m/wlDYNqCla81
One (hacky) command is "hadoop fsck /path/to/file -files -blocks -locations". You should rather write your own command with http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/fs/FileSystem.html#getFileBlockLocations(org.apache.hadoop.fs.FileStatus, long, long) so that its lighter and more direct. On Wed, Jan 11, 2012 at 5:22 PM, Pedro Costa <psdc1...@gmail.com> wrote: > Hi, > > How can I know in which datanodes a file is replicated in HDFS? Is there a > command for that? > > -- > Thanks, > -- Harsh J