[
https://issues.apache.org/jira/browse/BOOKKEEPER-629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13692680#comment-13692680
]
Sijie Guo commented on BOOKKEEPER-629:
--------------------------------------
{quote}
Could you please explain how to use this default version. Can you point me to
any usage in our component.
Are you suggesting to add version in StringUtils.java. Am I missing anything?
It would be great if you could help me to know more about, who will store the
version and do the version validation.
{quote}
I don't think we need to define any version in this case.
I meant method overload.
{code}
addrToString(addr) {
return addrToString(addr, false);
}
addrToString(addr, useHostName) {
// do the logic
}
{code}
So you just modify the places that need to use addrToString(addr, useHostName).
{code}
How about handling 'KeeperException.NoNodeException' while
Cookie.readFromZooKeeper() and also check the existence of bookieIpAddress. If
exists, after successful verification, keep the new converted cookie data in
zookeeper and then delete the old one from zookeeper.
{code}
I would suggest not doing this in the startup of bookie.
1. useHost flag of a bookie should be decided: first by its identifier in
cookie file. if it is IP, useHost should be set to false, otherwise set to
true. if there is no cookie, use the flag defined in the configuration file.
2. provide a admin tool to change its identifier from IP to hostname, or from
hostname to IP.
{code}
Also, I feel it would be good to provide upgradation of the existing
ledger/autorecovery metadata info by using hostname instead of IP. IMHO will
help users to do IP change more efficiently. Any thoughts?
{code}
+1 for it. it should be another admin command like recovery command.
> Support hostname based ledger metadata to help users to change IP with
> exitsting installation
> ---------------------------------------------------------------------------------------------
>
> Key: BOOKKEEPER-629
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-629
> Project: Bookkeeper
> Issue Type: Improvement
> Components: bookkeeper-client, bookkeeper-server
> Affects Versions: 4.2.1, 4.3.0
> Reporter: Vinay
> Assignee: Rakesh R
> Fix For: 4.3.0
>
> Attachments: 1-BOOKKEEPER-629.patch
>
>
> Register the bookie with *hostname:port* and also store the bookie addresses
> as *hostname:port* in ledger metadata files instead of *ip:port*
> This will help users to change the machine IP if they want without loosing
> their data.
> Supporting hostname based installation/functionality is one of the important
> requirement of users.
> Any thoughts?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira