[
https://issues.apache.org/jira/browse/BOOKKEEPER-782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14135333#comment-14135333
]
Rakesh R commented on BOOKKEEPER-782:
-------------------------------------
FYI, BOOKKEEPER-773 also has similar requirement of updating the
bookieHostId(1). Inorder to do this again it needs to pass another argument
'bookieHostId'' or another overloaded method by taking BookieAddress. If agrees
will prepare one more patch.
(1)Below piece of code is taken from [BOOKKEEPER-773 JIRA patch number -
006-BOOKKEEPER-773-rename-bookieid.patch|https://issues.apache.org/jira/secure/attachment/12668023/006-BOOKKEEPER-773-rename-bookieid.patch].
This will be modified by using the new builder fashion.
{code}
+ Cookie cookie = Cookie.readFromZooKeeper(zk, conf);
+ cookie = cookie.setBookieHost(newBookieHost);
+ cookie.writeToZooKeeper(zk, conf);
{code}
> Use builder pattern for Cookie
> ------------------------------
>
> Key: BOOKKEEPER-782
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-782
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-server
> Reporter: Rakesh R
> Assignee: Rakesh R
> Fix For: 4.3.0
>
> Attachments: BOOKKEEPER-782.patch, BOOKKEEPER-782.patch,
> BOOKKEEPER-782.patch, BOOKKEEPER-782.patch
>
>
> It would be good to use builder pattern for Cookie, rather than modifying the
> fields in place.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)