hadoop-hdfs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hardik Pandya <smarty.ju...@gmail.com>
Subject Re: How to get locations of blocks programmatically?
Date Fri, 28 Mar 2014 17:29:44 GMT
have you looked into FileSystem API this is hadoop v2.2.0


does not exist in

> *listFiles
boolean recursive)
          List the statuses and block locations of the files in the given
path.   org.apache.hadoop.fs.RemoteIterator<LocatedFileStatus<http://hadoop.apache.org/docs/r2.2.0/api/org/apache/hadoop/fs/LocatedFileStatus.html>
> *listLocatedStatus
          List the statuses of the files/directories in the given path if
the path is a directory.

On Thu, Mar 27, 2014 at 10:03 PM, 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

View raw message