You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org> on 2009/05/02 00:09:30 UTC

[jira] Commented: (ZOOKEEPER-380) bookkeeper should have a streaming api so that its easier to store checpoints/snapshots in bookkeeper.

    [ https://issues.apache.org/jira/browse/ZOOKEEPER-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12705148#action_12705148 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-380:
--------------------------------------------------

It looks good so far, Mahadev. One comment I have is that in LedgerInputStream you probably don't want to  read a whole ledger before you start making bytes available to the application as the constructors in the patch do. A ledger might have a large number of entries (or bytes) and you may want to bring entries incrementally as the application consumes bytes. One way of dealing with this issue is to have LedgerInputStream::refill also reading new entries instead of only checking if there are more entries in the LedgerSequence object le.


> bookkeeper should have a streaming api so that its easier to store checpoints/snapshots in bookkeeper.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-380
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-380
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>            Reporter: Mahadev konar
>            Assignee: Mahadev konar
>         Attachments: ZOOKEEPER-380.patch, ZOOKEEPER-380.patch, ZOOKEEPER-380.patch, ZOOKEEPER-380.patch
>
>
> currently, bookkeeper api allows just a bytes interface which is 
> ld.write(bytes).
> We should have an interface like 
> Stream s = ledger.createStream() (I am not very sure of the interface right now but will post a more concrete one after giving it a little more thought)
> now this stream can be used to wirte checkpoints as 
> s.write(bytes)
> and then closed to s.close() to close the snapshot. 
> This api could use the current api to implement snapshots as chunks of bytes (buffered by stream s) that can be written via ld.write(bytes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.