Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
MapReduce, mail # user - How can I know in which datanodes a file is replicated in HDFS?


Copy link to this message
-
Re: How can I know in which datanodes a file is replicated in HDFS?
Harsh J 2012-01-11, 12:25
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 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How can I know in which datanodes a file is replicated in HDFS? Is there a
> command for that?
>
> --
> Thanks,
>

--
Harsh J