[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14138788#comment-14138788
 ] 

Ivan Kelly commented on BOOKKEEPER-773:
---------------------------------------


the usage is a little wierd. useHostNameAdBookieID is a redundant token. 
something like "bkrename -cookieBookieId <hostname|ip>" would be clearer. 
Though really these should be separate tools for updating ledger and updating 
cookies, as they operate on different parts of the system. The grouping only 
exists because they both relate to the feature. It would better to have 
something like. "updatecookie -bookieId <hostname|ip>". This "updatecookie" 
command could then be used in the future if we wanted to do something like 
adding or removing ledger/journal directories in the cookie.

It's possible that someone would try to update the cookie without correct 
setting in their configuration, and then start up the bookie who thinks it 
should use ip when the hostname. The cookie check at boot should prevent 
anything really nasty from happening, but the error may be a bit confusing to 
the client. For this reason, we should check the server configuration, and if 
getUseHostNameAsBookieId() doesn't match what the tool has, then we should 
print a reminder for the user to update their configuration.

The modification of this.znodeVersion makes me a little uncomfortable. Perhaps 
it would be better to either return the newVersion, or a new cookie with the 
new version. It's only a mild discomfort, I wouldn't block the patch because of 
it.

On a side note, the patch has a lot of ^M(\r) characters at the end of the 
line. I guess this is because you are using windows. Could you disable windows 
line delimiters as they show up ugly on linux/mac. Windows is happy to accept 
\n also. http://stackoverflow.com/questions/1886185/eclipse-and-windows-newlines

Otherwise, the flow of the update looks good to me. Good work.

> 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, 
> 006-BOOKKEEPER-773-rename-bookieid.patch, 
> 007-BOOKKEEPER-773-rename-bookieid.patch, 
> 008-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)

Reply via email to