[
https://issues.apache.org/jira/browse/BOOKKEEPER-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080832#comment-14080832
]
Rakesh R commented on BOOKKEEPER-773:
-------------------------------------
Thanks [~hustlmsp] for the reviews. After seeing the comments, I think the
command format in the proposed patch will not work well. It will be difficult
to deal with the case of identifying and deleting the old cookie from zk.
_Rename command format_ would be :
{code}
renamebookieincookies -useHostNameAsBookieID <true|false>
{code}
Sequence would be:
# read cookie from zookeeper. For reading it will invert useHostNameAsBookieID
flag value to the configuration, then read the previous cookie zPath. If cookie
doesn't exists in zk, log cause and exit with -1.
# generate new cookie. Here it will set the given 'useHostNameAsBookieID' flag
value to the configuration and get the Bookie.getBookieAddress(conf). Write
this new cookie to zk.
# update new cookie into local directories.
# create new cookie with new zk path with new bookie id
# delete the old one. Here it will invert useHostNameAsBookieID flag value and
get the previous cookie zPath
bq.change the bookie id and update it back to zookeeper to use same zk path.
I think this is not required and can be removed ?
\\
I've attached new patch to understand the flow better. Whats your opinion ?
> 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
>
>
> 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.2#6252)