Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 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?
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
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB