[HDFS] result order of getFileBlockLocations() and listFiles()?

2014-10-29 Thread Demai Ni
hi, Guys, I am trying to implement a simple program(that is not for production, experimental). And invoke FileSystem.listFiles() to get a list of files under a hdfs folder, and then use FileSystem.getFileBlockLocations() to get replica locations of each file/blocks. Since it is a controlled

getFileBlockLocations

2013-10-04 Thread John Lilley
When I call getFileBlockLocations() on a DFS, will it return the blocks for currently-inactive nodes? If so, how can I filter out the unavailable blocks? Or more generally, how do I get the list of node status? Is that ApplicationClientProtocol.getClusterNodes()? Thanks, John

Re: getFileBlockLocations

2013-10-04 Thread Nicolas Liochon
...@redpoint.netwrote: When I call getFileBlockLocations() on a DFS, will it return the blocks for currently-inactive nodes? If so, how can I filter out the unavailable blocks? Or more generally, how do I get the list of node status

Re: getFileBlockLocations on a newly created and closed file

2012-06-07 Thread Todd Lipcon
Hey Nicholas, This is the expected behavior based on the default configuration of dfs.replication.min. When you close the file, the client waits until all of the DNs have the block fully written, but the DNs report the replica to the NN asychronously. So with the default configuration, the client

Re: getFileBlockLocations on a newly created and closed file

2012-06-07 Thread N Keywal
Thanks Todd! We have a unit test in hbase expecting this, but I am not sure that hbase itself wants it. I will have a look at it... Cheers, N. Le 8 juin 2012 00:42, Todd Lipcon t...@cloudera.com a écrit : Hey Nicholas, This is the expected behavior based on the default configuration of