[
https://issues.apache.org/jira/browse/BOOKKEEPER-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14129688#comment-14129688
]
Sijie Guo commented on BOOKKEEPER-773:
--------------------------------------
I think the thread is kind of being too long. let me recap what I commented
before (since I didn't see them in the new patch).
(those comments are only one rename cookie part)
* in general, all class variables in Cookie should be final. please use a
Builder pattern to generate a new Cookie object when modifying it. DONT modify
the field in-place, which would usually introduce bugs.
* getArgBooleanValue: I would suggest throw exceptions when encountered any bad
arguments, rather then silent them.
{code}
+ private static boolean getArgBooleanValue(String arg, String option,
boolean defaultVal) {
+ try {
+ return Boolean.parseBoolean(arg);
+ } catch (NumberFormatException nfe) {
+ System.err.println("ERROR: invalid value for option " + option + "
: " + arg);
+ return defaultVal;
+ }
+ }
{code}
*
> Provide admin tool to rename bookie identifier in Cookies
> ---------------------------------------------------------
>
> Key: BOOKKEEPER-773
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-773
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-server
> Reporter: Rakesh R
> Assignee: Rakesh R
> Fix For: 4.3.0
>
> Attachments: 001-BOOKKEEPER-773-rename-bookieid-in-cookies.patch,
> 002-BOOKKEEPER-773-rename-bookieid-in-cookies.patch,
> 003-BOOKKEEPER-773-rename-bookieid-in-cookies.patch,
> 004-BOOKKEEPER-773-rename-bookieid.patch,
> 005-BOOKKEEPER-773-rename-bookieid.patch
>
>
> The idea of this JIRA to implement a mechanism to efficiently rename the
> bookie identifier present in the Cookies. Cookie information will be present
> in:
> - ledger & journal directories in each Bookie server
> - cookies znode in ZooKeeper
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)