Thanks for your reply Flavio.

So if I want to use it like log file. I have to maintain a  (name ->
ledger_id) mapping in zookeeper in case restart or program crash ?

BTW: Is BookKeeper production ready ?


Best Regards,
Stone



On Wed, May 30, 2012 at 6:03 PM, Flavio Junqueira <[email protected]> wrote:

> Hi Stone, You can't set the name of a ledger directly through bookkeeper
> at the moment. One option to consider is creating a map in zookeeper from
> name to id.
>
> On your checkpoint question, I think you're asking how to selectively
> delete entries from a ledger. We currently only delete at the granularity
> of ledgers.
>
> -Flavio
>
> On May 30, 2012, at 10:05 AM, Stone wrote:
>
> Hello,
>
> I am new to BookKeeper. Played with the BookKeeper API, I can create a
> ledger  like the following:
>
>   val lh = client.createLedger(3, 2, BookKeeper.DigestType.CRC32, "foobar"
> .getBytes);
>
> and open an existing one with :
>
> val lh2 = client.openLedger(ledgerId, BookKeeper.DigestType.CRC32, 
> "foobar".getBytes);
>
>
>
> but it seems there's no way to give ledger a string name (or ledger id
> manually) like a name for a log file.
>
> Another the question is how can I do checkpointing using BookKeeper ?
> What I need is like write WAL to ledger when the old changes applied I can
> call
>
>   ledger.checkPoint()  // which can delete old log entries in a certain
> ledger.
>
>
> Any suggestions ?
>
> Thanks & Best Regards,
> Stone
>
>
>
>

Reply via email to