hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: How to get locations of blocks programmatically?
Date Fri, 28 Mar 2014 07:35:23 GMT
Yes, use http://hadoop.apache.org/docs/stable2/api/org/apache/hadoop/fs/FileSystem.html#getFileBlockLocations(org.apache.hadoop.fs.Path,
long, long)

On Fri, Mar 28, 2014 at 7:33 AM, Libo Yu <yu_libo@hotmail.com> wrote:
> Hi all,
>
> "hadoop path fsck -files -block -locations" can list locations for all
> blocks in the path.
> Is it possible to list all blocks and the block locations for a given path
> programmatically?
> Thanks,
>
> Libo



-- 
Harsh J

Mime
View raw message