Hi Flavio,

I am using zookeeper 3.2.2. The documentation on apache 
(http://hadoop.apache.org/zookeeper/docs/r3.3.0/bookkeeperStarted.html) refers 
to example that uses LedgerSequence class.


Basically I am trying to use BookKeeper / Hedwig and see if they can be used as 
a reliable message bus. Hedwig has only a video (http://vimeo.com/13282102) 
that 
explains the system overview. But installation is non-trivial. I tried building 
from trunk, but trunk version is 3.4 and hedwig bundles zk 3.2 code within 
itself. In short, was not able to build/install hedwig.

1. Could you please give some pointers for hedwig. It seems that BookKeeper 
APIs 
need higher level abstraction which Hedwig can provide.

2. How does bookkeeper handles zk session expiry? To be honest, zk itself 
should 
come up with a solution to recover from session expiry. Found this blog 
: http://sna-projects.com/blog/2010/08/zookeeper-experience/ which actually 
lists all the issues that I also faced while working with zk. 

3. Any comments on '“Low Latency Message Bus With Scribe and HDFS
 : http://sna-projects.com/blog/2010/09/scribe-and-hdfs/ and how that compares 
to BookKeeper / Hedwig?

-regards
Amit




----- Original Message ----
From: Flavio Junqueira <f...@yahoo-inc.com>
To: "zookeeper-user@hadoop.apache.org" <zookeeper-user@hadoop.apache.org>
Sent: Fri, 1 October, 2010 2:37:35 PM
Subject: Re: BookKeeper newbie question

Thanks for your questions, Amit.

On Sep 28, 2010, at 6:37 PM, amit jaiswal wrote:

> Hi,
> 
> I am experimenting with BookKeeper and have a question on LedgerHandler class.
> The readEntries(firstEntry, lastEntry) method takes the indexes of first and
> last entries. Also, the LedgerSequence object returned has method
> hasMoreElements().

Which version are you using? I don't think we have LedgerSequence any longer.

> 
> Question:
> 1. How does a client knows the index of the last entry? I was expecting 
clients
> to make a call like readEntries(0, Integer.MAX_INT) and the hasMoreElements() 
>to
> return false the moment there are no more entries. Am I missing something in 
>the
> way the API is supposed to be used?
> 

I believe you should use public long getLastAddConfirmed().


> 2. The LedgerSequence.hasMoreElements() returns true (even if there are no 
more
> entries), and the nextEntry returns null.
> 

readEntries currently return Enumeration<LedgerEntry>, but I just noticed that 
the documentation is not correct, so I'll open a jira to fix it.

-Flavio

Reply via email to