You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Enrico Olivelli (JIRA)" <ji...@apache.org> on 2016/05/24 12:34:12 UTC
[jira] [Comment Edited] (BOOKKEEPER-928) Add custom client supplied
metadata field to LedgerMetadata
[ https://issues.apache.org/jira/browse/BOOKKEEPER-928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15298100#comment-15298100 ]
Enrico Olivelli edited comment on BOOKKEEPER-928 at 5/24/16 12:33 PM:
----------------------------------------------------------------------
We need to add a new createLedger method, like
{code}
public void asyncCreateLedger(final int ensSize,
final int writeQuorumSize,
final int ackQuorumSize,
final DigestType digestType,
final byte[] passwd,
final byte[] customMetadata,
final CreateCallback cb, final Object ctx) {
{code}
Would it be better to create a CreateLedgerSpecs bean like
{code}
class CreateLedgerSpecs {
int ensSize;
int writeQuorumSize;
int ackQuorumSize;
DigestType digestType;
byte[] passwd;
byte[] customMetadata;
}
{code}
and create a more future-proof createLedger method (and the blocking counter part)
{code}
public void asyncCreateLedger(
final CreateLedgerSpecs specs,
final CreateCallback cb, final Object ctx) {
{code}
for the CreateLedgerSpecs bean we could follow the Builder pattern in order to have a more intuitive API
what do you think ?
was (Author: eolivelli):
We need to add a new createLedger method, like
{code}
public void asyncCreateLedger(final int ensSize,
final int writeQuorumSize,
final int ackQuorumSize,
final DigestType digestType,
final byte[] passwd,
final byte[] customMetadata,
final CreateCallback cb, final Object ctx) {
{code}
Would it be better to create a CreateLedgerSpecs bean like
{code}
class CreateLedgerSpecs {
int ensSize;
int writeQuorumSize;
int ackQuorumSize;
DigestType digestType;
byte[] passwd;
byte[] customMetadata;
}
{code}
and create a more future-proof createLedger method (and the blocking counter part)
{code}
public void asyncCreateLedger(
final CreateLedgerSpecs,
final CreateCallback cb, final Object ctx) {
{code}
for the CreateLedgerSpecs bean we could follow the Builder pattern in order to have a more intuitive API
what do you think ?
> Add custom client supplied metadata field to LedgerMetadata
> -----------------------------------------------------------
>
> Key: BOOKKEEPER-928
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-928
> Project: Bookkeeper
> Issue Type: New Feature
> Components: bookkeeper-client, bookkeeper-server
> Affects Versions: 4.4.0
> Reporter: Enrico Olivelli
> Fix For: 4.5.0
>
>
> The idea is to let the client write a custom byte[] field which contains useful custom metadata about the ledger.
> This field is needed by BOOKKEEPER-912
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)