You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@bookkeeper.apache.org by Dongdong Guo <gu...@rd.netease.com> on 2011/12/22 09:44:48 UTC

Question about "asyncAddEntry"

I use the bookkeeper to store the namenode transcation log, when i add the entry to "LedgerHandle", the callback function "AddCallback", if the "rc" is not "ok", how do i deal with it,

Re: Question about "asyncAddEntry"

Posted by Dongdong Guo <gu...@rd.netease.com>.
thanks very much
if I store the ledger in the two bookie, then one bookie failed , only one bookie store the ledger data, will the ledger data be replicated  to another bookie, thanks

----- 原始邮件 -----
发件人: "Flavio Junqueira" <fp...@yahoo-inc.com>
收件人: "Dongdong Guo" <gu...@rd.netease.com>
抄送: bookkeeper-user@zookeeper.apache.org, ivank@apache.org
发送时间: 星期五, 2011年 12 月 23日 下午 6:31:10
主题: Re: Question about "asyncAddEntry"

I'm not sure why you're saying that the second has to wait for the first to complete, this is not how it works. If your applications submits add1 and add2 asynchronously, they will be written concurrently. Even if add2 is written earlier to its quorum, we only complete add2 once add1 has completed. 


-Flavio 







On Dec 23, 2011, at 11:12 AM, Dongdong Guo wrote: 



I have done the test, the performance of asynchronous version is really greater than synchronous version, but my question is below: 

To the asynchronous version, I add lots of entries, then wait. but in fact that the AddOps is done in order, that mean only when the qSize bookie finished for the first entry, then the second entry can start 
it is same with "synchronous version", where the performance difference comes 

thanks very much 

----- 原始邮件 ----- 
发件人: "Flavio Junqueira" < fpj@yahoo-inc.com > 
收件人: bookkeeper-user@zookeeper.apache.org 
抄送: ivank@apache.org 
发送时间: 星期五, 2011年 12 月 23日 下午 5:53:58 
主题: Re: Question about "asyncAddEntry" 

The different is essentially speed. With the asynchronous version, you'll have a number of requests outstanding at a time, and you'll be able to issue more add requests per second (higher throughput). 


-Flavio 





On Dec 23, 2011, at 10:43 AM, Dongdong Guo wrote: 



thanks very much, I have saw the source code, but I have another question 

I use "asyncAddEntry" to add lots of entries, but it is done in order, what is difference with using "addEntry" to add lots of entries 

----- 原始邮件 ----- 
发件人: "Ivan Kelly" < ivank@apache.org > 
收件人: bookkeeper-user@zookeeper.apache.org 
发送时间: 星期五, 2011年 12 月 23日 下午 5:33:28 
主题: Re: Question about "asyncAddEntry" 

See: 

https://github.com/apache/bookkeeper/blob/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java #L426 

Basically, the SafeRunnable is added to the worker thread in order, so these get run in order. The SafeRunnable added the op to pendingAddOps, and runs the op. If an add op error unrecoverably, all operations after the failed operation are failed by the ledger handle, see errorOutPendingAdds. 

-Ivan 





On 23 December 2011 09:12, Dongdong Guo < guodd@rd.netease.com > wrote: 


I saw the source code, but i can not find the place where bookkeeper add entries in order, could you tell me where ? 

thanks 


----- 原始邮件 ----- 
发件人: "Ivan Kelly" < ivank@apache.org > 
收件人: bookkeeper-user@zookeeper.apache.org 
发送时间: 星期四, 2011年 12 月 22日 下午 7:35:11 

主题: Re: Question about "asyncAddEntry" 



On Thu, Dec 22, 2011 at 07:25:40PM +0800, Dongdong Guo wrote: 


I use the "asyncAddEntry" and add lots of data, then wait finished, if the first entry failed, is it possible that the subsequence entry success 
No, bookkeeper will add entries in order. If an add op fails 
completely, then all subsequent add ops will be errored, and the 
ledger will be forced to close. 

-Ivan 









flavio 
junqueira 

research scientist 

fpj@yahoo-inc.com 
direct +34 93-183-8828 

avinguda diagonal 177, 8th floor, barcelona, 08018, es 
phone (408) 349 3300 fax (408) 349 3301 







flavio 
junqueira 

research scientist 

fpj@yahoo-inc.com 
direct +34 93-183-8828 

avinguda diagonal 177, 8th floor, barcelona, 08018, es 
phone (408) 349 3300 fax (408) 349 3301 

Re: Question about "asyncAddEntry"

Posted by Flavio Junqueira <fp...@yahoo-inc.com>.
I'm not sure why you're saying that the second has to wait for the  
first to complete, this is not how it works. If your applications  
submits add1 and add2 asynchronously, they will be written  
concurrently. Even if add2 is written earlier to its quorum, we only  
complete add2 once add1 has completed.

-Flavio

On Dec 23, 2011, at 11:12 AM, Dongdong Guo wrote:

> I have done the test, the performance of asynchronous version is  
> really greater than synchronous version, but my question is below:
>
> To the asynchronous version, I add lots of entries, then wait. but  
> in fact that the AddOps is done in order, that mean only when the  
> qSize bookie finished for the first entry, then the second entry can  
> start
> it is same with "synchronous version", where the performance  
> difference comes
>
> thanks very much
>
> ----- 原始邮件 -----
> 发件人: "Flavio Junqueira" <fp...@yahoo-inc.com>
> 收件人: bookkeeper-user@zookeeper.apache.org
> 抄送: ivank@apache.org
> 发送时间: 星期五, 2011年 12 月 23日 下午 5:53:58
> 主题: Re: Question about "asyncAddEntry"
>
> The different is essentially speed. With the asynchronous version,  
> you'll have a number of requests outstanding at a time, and you'll  
> be able to issue more add requests per second (higher throughput).
>
>
> -Flavio
>
>
>
>
>
> On Dec 23, 2011, at 10:43 AM, Dongdong Guo wrote:
>
>
>
> thanks very much, I have saw the source code, but I have another  
> question
>
> I use "asyncAddEntry" to add lots of entries, but it is done in  
> order, what is difference with using "addEntry" to add lots of entries
>
> ----- 原始邮件 -----
> 发件人: "Ivan Kelly" < ivank@apache.org >
> 收件人: bookkeeper-user@zookeeper.apache.org
> 发送时间: 星期五, 2011年 12 月 23日 下午 5:33:28
> 主题: Re: Question about "asyncAddEntry"
>
> See:
>
> https://github.com/apache/bookkeeper/blob/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
>  #L426
>
> Basically, the SafeRunnable is added to the worker thread in order,  
> so these get run in order. The SafeRunnable added the op to  
> pendingAddOps, and runs the op. If an add op error unrecoverably,  
> all operations after the failed operation are failed by the ledger  
> handle, see errorOutPendingAdds.
>
> -Ivan
>
>
>
>
>
> On 23 December 2011 09:12, Dongdong Guo < guodd@rd.netease.com >  
> wrote:
>
>
> I saw the source code, but i can not find the place where  
> bookkeeper add entries in order, could you tell me where ?
>
> thanks
>
>
> ----- 原始邮件 -----
> 发件人: "Ivan Kelly" < ivank@apache.org >
> 收件人: bookkeeper-user@zookeeper.apache.org
> 发送时间: 星期四, 2011年 12 月 22日 下午 7:35:11
>
> 主题: Re: Question about "asyncAddEntry"
>
>
>
> On Thu, Dec 22, 2011 at 07:25:40PM +0800, Dongdong Guo wrote:
>
>
> I use the "asyncAddEntry" and add lots of data, then wait finished,  
> if the first entry failed, is it possible that the subsequence entry  
> success
> No, bookkeeper will add entries in order. If an add op fails
> completely, then all subsequent add ops will be errored, and the
> ledger will be forced to close.
>
> -Ivan
>
>
>
>
>
>
>
>
>
> flavio
> junqueira
>
> research scientist
>
> fpj@yahoo-inc.com
> direct +34 93-183-8828
>
> avinguda diagonal 177, 8th floor, barcelona, 08018, es
> phone (408) 349 3300 fax (408) 349 3301

flavio
junqueira

research scientist

fpj@yahoo-inc.com
direct +34 93-183-8828

avinguda diagonal 177, 8th floor, barcelona, 08018, es
phone (408) 349 3300    fax (408) 349 3301


Re: Question about "asyncAddEntry"

Posted by Dongdong Guo <gu...@rd.netease.com>.
I have done the test, the performance of asynchronous version is really greater than synchronous version, but my question is below:

To the asynchronous version, I add lots of entries, then wait. but in fact that the AddOps is done in order, that mean only when the qSize bookie finished for the first entry, then the second entry can start
it is same with "synchronous version", where the performance difference comes

thanks very much

----- 原始邮件 -----
发件人: "Flavio Junqueira" <fp...@yahoo-inc.com>
收件人: bookkeeper-user@zookeeper.apache.org
抄送: ivank@apache.org
发送时间: 星期五, 2011年 12 月 23日 下午 5:53:58
主题: Re: Question about "asyncAddEntry"

The different is essentially speed. With the asynchronous version, you'll have a number of requests outstanding at a time, and you'll be able to issue more add requests per second (higher throughput). 


-Flavio 





On Dec 23, 2011, at 10:43 AM, Dongdong Guo wrote: 



thanks very much, I have saw the source code, but I have another question 

I use "asyncAddEntry" to add lots of entries, but it is done in order, what is difference with using "addEntry" to add lots of entries 

----- 原始邮件 ----- 
发件人: "Ivan Kelly" < ivank@apache.org > 
收件人: bookkeeper-user@zookeeper.apache.org 
发送时间: 星期五, 2011年 12 月 23日 下午 5:33:28 
主题: Re: Question about "asyncAddEntry" 

See: 

https://github.com/apache/bookkeeper/blob/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java #L426 

Basically, the SafeRunnable is added to the worker thread in order, so these get run in order. The SafeRunnable added the op to pendingAddOps, and runs the op. If an add op error unrecoverably, all operations after the failed operation are failed by the ledger handle, see errorOutPendingAdds. 

-Ivan 





On 23 December 2011 09:12, Dongdong Guo < guodd@rd.netease.com > wrote: 


I saw the source code, but i can not find the place where bookkeeper add entries in order, could you tell me where ? 

thanks 


----- 原始邮件 ----- 
发件人: "Ivan Kelly" < ivank@apache.org > 
收件人: bookkeeper-user@zookeeper.apache.org 
发送时间: 星期四, 2011年 12 月 22日 下午 7:35:11 

主题: Re: Question about "asyncAddEntry" 



On Thu, Dec 22, 2011 at 07:25:40PM +0800, Dongdong Guo wrote: 


I use the "asyncAddEntry" and add lots of data, then wait finished, if the first entry failed, is it possible that the subsequence entry success 
No, bookkeeper will add entries in order. If an add op fails 
completely, then all subsequent add ops will be errored, and the 
ledger will be forced to close. 

-Ivan 









flavio 
junqueira 

research scientist 

fpj@yahoo-inc.com 
direct +34 93-183-8828 

avinguda diagonal 177, 8th floor, barcelona, 08018, es 
phone (408) 349 3300 fax (408) 349 3301 

Re: Question about "asyncAddEntry"

Posted by Flavio Junqueira <fp...@yahoo-inc.com>.
The different is essentially speed. With the asynchronous version,  
you'll have a number of requests outstanding at a time, and you'll be  
able to issue more add requests per second (higher throughput).

-Flavio

On Dec 23, 2011, at 10:43 AM, Dongdong Guo wrote:

> thanks very much, I have saw the source code, but I have another  
> question
>
> I use "asyncAddEntry" to add lots of entries, but it is done in  
> order, what is difference with using "addEntry" to add lots of entries
>
> ----- 原始邮件 -----
> 发件人: "Ivan Kelly" <iv...@apache.org>
> 收件人: bookkeeper-user@zookeeper.apache.org
> 发送时间: 星期五, 2011年 12 月 23日 下午 5:33:28
> 主题: Re: Question about "asyncAddEntry"
>
> See:
>
> https://github.com/apache/bookkeeper/blob/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java 
> #L426
>
> Basically, the SafeRunnable is added to the worker thread in order,  
> so these get run in order. The SafeRunnable added the op to  
> pendingAddOps, and runs the op. If an add op error unrecoverably,  
> all operations after the failed operation are failed by the ledger  
> handle, see errorOutPendingAdds.
>
> -Ivan
>
>
>
>
>
> On 23 December 2011 09:12, Dongdong Guo < guodd@rd.netease.com >  
> wrote:
>
>
> I saw the source code, but i can not find the place where  
> bookkeeper add entries in order, could you tell me where ?
>
> thanks
>
>
> ----- 原始邮件 -----
> 发件人: "Ivan Kelly" < ivank@apache.org >
> 收件人: bookkeeper-user@zookeeper.apache.org
> 发送时间: 星期四, 2011年 12 月 22日 下午 7:35:11
>
> 主题: Re: Question about "asyncAddEntry"
>
>
>
> On Thu, Dec 22, 2011 at 07:25:40PM +0800, Dongdong Guo wrote:
>> I use the "asyncAddEntry" and add lots of data, then wait finished,  
>> if the first entry failed, is it possible that the subsequence  
>> entry success
> No, bookkeeper will add entries in order. If an add op fails
> completely, then all subsequent add ops will be errored, and the
> ledger will be forced to close.
>
> -Ivan
>
>

flavio
junqueira

research scientist

fpj@yahoo-inc.com
direct +34 93-183-8828

avinguda diagonal 177, 8th floor, barcelona, 08018, es
phone (408) 349 3300    fax (408) 349 3301


Re: Question about "asyncAddEntry"

Posted by Dongdong Guo <gu...@rd.netease.com>.
thanks very much, I have saw the source code, but I have another question

I use "asyncAddEntry" to add lots of entries, but it is done in order, what is difference with using "addEntry" to add lots of entries

----- 原始邮件 -----
发件人: "Ivan Kelly" <iv...@apache.org>
收件人: bookkeeper-user@zookeeper.apache.org
发送时间: 星期五, 2011年 12 月 23日 下午 5:33:28
主题: Re: Question about "asyncAddEntry"

See: 

https://github.com/apache/bookkeeper/blob/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java#L426 

Basically, the SafeRunnable is added to the worker thread in order, so these get run in order. The SafeRunnable added the op to pendingAddOps, and runs the op. If an add op error unrecoverably, all operations after the failed operation are failed by the ledger handle, see errorOutPendingAdds. 

-Ivan 





On 23 December 2011 09:12, Dongdong Guo < guodd@rd.netease.com > wrote: 


I saw the source code, but i can not find the place where bookkeeper add entries in order, could you tell me where ? 

thanks 


----- 原始邮件 ----- 
发件人: "Ivan Kelly" < ivank@apache.org > 
收件人: bookkeeper-user@zookeeper.apache.org 
发送时间: 星期四, 2011年 12 月 22日 下午 7:35:11 

主题: Re: Question about "asyncAddEntry" 



On Thu, Dec 22, 2011 at 07:25:40PM +0800, Dongdong Guo wrote: 
> I use the "asyncAddEntry" and add lots of data, then wait finished, if the first entry failed, is it possible that the subsequence entry success 
No, bookkeeper will add entries in order. If an add op fails 
completely, then all subsequent add ops will be errored, and the 
ledger will be forced to close. 

-Ivan 



Re: Question about "asyncAddEntry"

Posted by Ivan Kelly <iv...@apache.org>.
See:
https://github.com/apache/bookkeeper/blob/trunk/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java#L426

Basically, the SafeRunnable is added to the worker thread in order, so
these get run in order. The SafeRunnable added the op to pendingAddOps, and
runs the op. If an add op error unrecoverably, all operations after the
failed operation are failed by the ledger handle, see errorOutPendingAdds.

-Ivan



On 23 December 2011 09:12, Dongdong Guo <gu...@rd.netease.com> wrote:

> I saw the source code, but i can not find the place where bookkeeper add
> entries in order, could you tell me  where ?
>
> thanks
>
> ----- 原始邮件 -----
> 发件人: "Ivan Kelly" <iv...@apache.org>
> 收件人: bookkeeper-user@zookeeper.apache.org
> 发送时间: 星期四, 2011年 12 月 22日 下午 7:35:11
> 主题: Re: Question about "asyncAddEntry"
>
> On Thu, Dec 22, 2011 at 07:25:40PM +0800, Dongdong Guo wrote:
> > I use the "asyncAddEntry" and add lots of  data, then wait finished, if
> the first entry failed, is it possible that the subsequence entry success
> No, bookkeeper will add entries in order. If an add op fails
> completely, then all subsequent add ops will be errored, and the
> ledger will be forced to close.
>
> -Ivan
>

Re: Question about "asyncAddEntry"

Posted by Dongdong Guo <gu...@rd.netease.com>.
I saw the source code, but i can not find the place where bookkeeper add entries in order, could you tell me  where ?

thanks

----- 原始邮件 -----
发件人: "Ivan Kelly" <iv...@apache.org>
收件人: bookkeeper-user@zookeeper.apache.org
发送时间: 星期四, 2011年 12 月 22日 下午 7:35:11
主题: Re: Question about "asyncAddEntry"

On Thu, Dec 22, 2011 at 07:25:40PM +0800, Dongdong Guo wrote:
> I use the "asyncAddEntry" and add lots of  data, then wait finished, if the first entry failed, is it possible that the subsequence entry success
No, bookkeeper will add entries in order. If an add op fails
completely, then all subsequent add ops will be errored, and the
ledger will be forced to close.

-Ivan

Re: Question about "asyncAddEntry"

Posted by Ivan Kelly <iv...@apache.org>.
On Thu, Dec 22, 2011 at 07:25:40PM +0800, Dongdong Guo wrote:
> I use the "asyncAddEntry" and add lots of  data, then wait finished, if the first entry failed, is it possible that the subsequence entry success
No, bookkeeper will add entries in order. If an add op fails
completely, then all subsequent add ops will be errored, and the
ledger will be forced to close.

-Ivan

Re: Question about "asyncAddEntry"

Posted by Dongdong Guo <gu...@rd.netease.com>.
I use the "asyncAddEntry" and add lots of  data, then wait finished, if the first entry failed, is it possible that the subsequence entry success

----- 原始邮件 -----
发件人: "Ivan Kelly" <iv...@apache.org>
收件人: bookkeeper-user@zookeeper.apache.org
发送时间: 星期四, 2011年 12 月 22日 下午 5:48:50
主题: Re: Question about "asyncAddEntry"

Yikes! you're right. We should be saving the rc here, triggering the
latch and then throwing an exception in flushAndSync(). This is a
bug. I've created a JIRA,
https://issues.apache.org/jira/browse/HDFS-2717 to fix this.

-Ivan

On Thu, Dec 22, 2011 at 05:39:55PM +0800, Dongdong Guo wrote:
> I saw the source code, but i can not find the place where throw an exception
>  
>  @Override
>   public void addComplete(int rc, LedgerHandle handle,
>                           long entryId, Object ctx) {
>     synchronized(this) {
>       outstandingRequests.decrementAndGet();
>       CountDownLatch l = syncLatch;
>       if (l != null) {
>         l.countDown();
>       }
>     }
>   }
> 
> "rc" is not used
> and i have another questions that If adding the Entry failed and I stop the "LedgerHandle", does it mean the subsequence data is not added
> 
> ----- 原始邮件 -----
> 发件人: "Ivan Kelly" <iv...@apache.org>
> 收件人: bookkeeper-user@zookeeper.apache.org
> 发送时间: 星期四, 2011年 12 月 22日 下午 5:19:46
> 主题: Re: Question about "asyncAddEntry"
> 
> We recently submitted a bookkeeper namenode journal implementation to
> HDFS. It's a contrib module of hadoop-hdfs-project/hadoop-hdfs.
> 
> See
> https://svn.apache.org/repos/asf/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/
> 
> To answer your question, if the add fails, then the log operation
> should throw an exception, and the bookkeeper journal manager should
> be moved out of rotation. If it is the only active journal manager,
> this will lead to the namenode crashing. This is because it's better
> to impede progress, than to allow progress which would be lost in a
> crash.
> 
> -Ivan
> 
> On Thu, Dec 22, 2011 at 04:44:48PM +0800, Dongdong Guo wrote:
> > I use the bookkeeper to store the namenode transcation log, when i add the entry to "LedgerHandle", the callback function "AddCallback", if the "rc" is not "ok", how do i deal with it,

Re: Question about "asyncAddEntry"

Posted by Ivan Kelly <iv...@apache.org>.
Yikes! you're right. We should be saving the rc here, triggering the
latch and then throwing an exception in flushAndSync(). This is a
bug. I've created a JIRA,
https://issues.apache.org/jira/browse/HDFS-2717 to fix this.

-Ivan

On Thu, Dec 22, 2011 at 05:39:55PM +0800, Dongdong Guo wrote:
> I saw the source code, but i can not find the place where throw an exception
>  
>  @Override
>   public void addComplete(int rc, LedgerHandle handle,
>                           long entryId, Object ctx) {
>     synchronized(this) {
>       outstandingRequests.decrementAndGet();
>       CountDownLatch l = syncLatch;
>       if (l != null) {
>         l.countDown();
>       }
>     }
>   }
> 
> "rc" is not used
> and i have another questions that If adding the Entry failed and I stop the "LedgerHandle", does it mean the subsequence data is not added
> 
> ----- 原始邮件 -----
> 发件人: "Ivan Kelly" <iv...@apache.org>
> 收件人: bookkeeper-user@zookeeper.apache.org
> 发送时间: 星期四, 2011年 12 月 22日 下午 5:19:46
> 主题: Re: Question about "asyncAddEntry"
> 
> We recently submitted a bookkeeper namenode journal implementation to
> HDFS. It's a contrib module of hadoop-hdfs-project/hadoop-hdfs.
> 
> See
> https://svn.apache.org/repos/asf/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/
> 
> To answer your question, if the add fails, then the log operation
> should throw an exception, and the bookkeeper journal manager should
> be moved out of rotation. If it is the only active journal manager,
> this will lead to the namenode crashing. This is because it's better
> to impede progress, than to allow progress which would be lost in a
> crash.
> 
> -Ivan
> 
> On Thu, Dec 22, 2011 at 04:44:48PM +0800, Dongdong Guo wrote:
> > I use the bookkeeper to store the namenode transcation log, when i add the entry to "LedgerHandle", the callback function "AddCallback", if the "rc" is not "ok", how do i deal with it,

Re: Question about "asyncAddEntry"

Posted by Dongdong Guo <gu...@rd.netease.com>.
I saw the source code, but i can not find the place where throw an exception
 
 @Override
  public void addComplete(int rc, LedgerHandle handle,
                          long entryId, Object ctx) {
    synchronized(this) {
      outstandingRequests.decrementAndGet();
      CountDownLatch l = syncLatch;
      if (l != null) {
        l.countDown();
      }
    }
  }

"rc" is not used
and i have another questions that If adding the Entry failed and I stop the "LedgerHandle", does it mean the subsequence data is not added

----- 原始邮件 -----
发件人: "Ivan Kelly" <iv...@apache.org>
收件人: bookkeeper-user@zookeeper.apache.org
发送时间: 星期四, 2011年 12 月 22日 下午 5:19:46
主题: Re: Question about "asyncAddEntry"

We recently submitted a bookkeeper namenode journal implementation to
HDFS. It's a contrib module of hadoop-hdfs-project/hadoop-hdfs.

See
https://svn.apache.org/repos/asf/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/

To answer your question, if the add fails, then the log operation
should throw an exception, and the bookkeeper journal manager should
be moved out of rotation. If it is the only active journal manager,
this will lead to the namenode crashing. This is because it's better
to impede progress, than to allow progress which would be lost in a
crash.

-Ivan

On Thu, Dec 22, 2011 at 04:44:48PM +0800, Dongdong Guo wrote:
> I use the bookkeeper to store the namenode transcation log, when i add the entry to "LedgerHandle", the callback function "AddCallback", if the "rc" is not "ok", how do i deal with it,

Re: Question about "asyncAddEntry"

Posted by Ivan Kelly <iv...@apache.org>.
We recently submitted a bookkeeper namenode journal implementation to
HDFS. It's a contrib module of hadoop-hdfs-project/hadoop-hdfs.

See
https://svn.apache.org/repos/asf/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/contrib/bkjournal/

To answer your question, if the add fails, then the log operation
should throw an exception, and the bookkeeper journal manager should
be moved out of rotation. If it is the only active journal manager,
this will lead to the namenode crashing. This is because it's better
to impede progress, than to allow progress which would be lost in a
crash.

-Ivan

On Thu, Dec 22, 2011 at 04:44:48PM +0800, Dongdong Guo wrote:
> I use the bookkeeper to store the namenode transcation log, when i add the entry to "LedgerHandle", the callback function "AddCallback", if the "rc" is not "ok", how do i deal with it,