You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by Yanbo Liang <ya...@gmail.com> on 2012/10/18 10:44:53 UTC

The lease hard limit is 1 hour and in another client want to append to a file need to wait for 1 hour?

The lease hard limit is 1 hour,
is it means that if one file hold the lease and exit without release it and
then another file want to append to the same file will to wait for a hour?

Re: The lease hard limit is 1 hour and in another client want to append to a file need to wait for 1 hour?

Posted by Yanbo Liang <ya...@gmail.com>.
The answer is useful, thanks to all of you.

2012/10/18 Uma Maheswara Rao G <ma...@huawei.com>

> Hi,
>
>  I am assuming that your actual client crashed. and another Client wants
> to append to same file which not closed by previous client.
>
> Generally we will append to the files which are in closed state. In your
> case file is still in open state.
>  So, you can call explicite recoverLease, so that file will be closed and
> then you can append the file.
> If you call directly append with out explicte receoverLease, it will check
> whether softlimit(1 min) expired.  If soft limit expired, then append call
> it self will trigger the recover lease and append call will get exception
> saying try again later and recovery in progress.
>
> Regards,
> Uma
>
> ________________________________________
> From: Yanbo Liang [yanbohappy@gmail.com]
> Sent: Thursday, October 18, 2012 2:14 PM
> To: hdfs-dev@hadoop.apache.org
> Subject: The lease hard limit is 1 hour and in another client want to
> append to a file need to wait for 1 hour?
>
> The lease hard limit is 1 hour,
> is it means that if one file hold the lease and exit without release it and
> then another file want to append to the same file will to wait for a hour?
>

RE: The lease hard limit is 1 hour and in another client want to append to a file need to wait for 1 hour?

Posted by Uma Maheswara Rao G <ma...@huawei.com>.
Hi,

 I am assuming that your actual client crashed. and another Client wants to append to same file which not closed by previous client.

Generally we will append to the files which are in closed state. In your case file is still in open state.
 So, you can call explicite recoverLease, so that file will be closed and then you can append the file.
If you call directly append with out explicte receoverLease, it will check whether softlimit(1 min) expired.  If soft limit expired, then append call it self will trigger the recover lease and append call will get exception saying try again later and recovery in progress.

Regards,
Uma
 
________________________________________
From: Yanbo Liang [yanbohappy@gmail.com]
Sent: Thursday, October 18, 2012 2:14 PM
To: hdfs-dev@hadoop.apache.org
Subject: The lease hard limit is 1 hour and in another client want to append to a file need to wait for 1 hour?

The lease hard limit is 1 hour,
is it means that if one file hold the lease and exit without release it and
then another file want to append to the same file will to wait for a hour?

Re: The lease hard limit is 1 hour and in another client want to append to a file need to wait for 1 hour?

Posted by Harsh J <ha...@cloudera.com>.
Hi Yanbo,

Clients can request a quicker lease recovery, via
DistributedFileSystem.recoverLease(Path f), as seen at
http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java?view=markup
(Line 236~). This is what HBase relies on when trying to open WAL
files for recovery.

Does this help?

On Thu, Oct 18, 2012 at 2:14 PM, Yanbo Liang <ya...@gmail.com> wrote:
> The lease hard limit is 1 hour,
> is it means that if one file hold the lease and exit without release it and
> then another file want to append to the same file will to wait for a hour?



-- 
Harsh J