zookeeper-bookkeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Junqueira <...@yahoo-inc.com>
Subject Re: Is there any way to set a string name for a ledger and how to do checkpoint ?
Date Wed, 30 May 2012 10:03:38 GMT
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
> 



Mime
View raw message