You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by Martin Serrano <ma...@attivio.com> on 2011/03/28 22:18:10 UTC
using API to determine when async file copy is complete
Is there a way to determine how many complete replicas there are of a file? That is, can I find out that the async replication has completed? And how many replicas are complete? I'd like to do this via the Java API.
Thanks,
Martin
Re: using API to determine when async file copy is complete
Posted by Todd Lipcon <to...@cloudera.com>.
Hi Martin,
Have a look at the waitForReplication() function in FsShell.java in
hadoop-common. It does what you're looking for.
-Todd
On Mon, Mar 28, 2011 at 1:18 PM, Martin Serrano <ma...@attivio.com> wrote:
> Is there a way to determine how many complete replicas there are of a
> file? That is, can I find out that the async replication has completed?
> And how many replicas are complete? I’d like to do this via the Java API.
>
>
>
> Thanks,
>
> Martin
>
>
>
--
Todd Lipcon
Software Engineer, Cloudera