[
https://issues.apache.org/jira/browse/BOOKKEEPER-629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13924936#comment-13924936
]
Rakesh R commented on BOOKKEEPER-629:
-------------------------------------
Thanks Sijie for the comments. It would be helpful to me if you can give some
more clarifications on:
bq. if there is any cookie files in the local directory, we should use
bookieHost in the cookie file as bookie id (znode path) to check, regarding the
settings in configuration.
Presently, Bookie#checkEnvironment flow is like, first verify the generated
Cookie with ZK and then verifying the same against journalDir &
ledgerDirectories respectively. Now for the proposed changes we should move
_readCookieFromDirs_ one level up like:
If cookie exists in local dir, then check whether the 'bookiehost' is based on
IP or HostName. If IP then set the 'useHostNameAsBookieID' flag to false
otherwise to true. If cookie doesn't exists, simply use the configured value of
'useHostNameAsBookieID'. After that do the verification as usual like ZK, then
journalDir and finally ledgerDirs.
Clarification-1) For setting/tuning the flag, I'll be using the cookie file of
journal directory. If there is any conflicts with cookie file of ledger dirs or
ZK node path, will simply throw exception and exits.
Clarification-2) We have one more way by completely reversing the
Bookie#checkEnvironment logic like follows:
# readCookieFile of journal dir, then sets the flag.
# Generate the masterCookie
# Verify masterCookie against the local directories.
# Verify masterCookie against ZK node path.
I feel not to reverse the existing verification logic. I'd like to know your
opinion.
Thanks,
Rakesh
> Support hostname based ledger metadata to help users to change IP with
> existing installation
> --------------------------------------------------------------------------------------------
>
> Key: BOOKKEEPER-629
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-629
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-auto-recovery, bookkeeper-client,
> bookkeeper-server
> Affects Versions: 4.2.1
> Reporter: Vinayakumar B
> Assignee: Rakesh R
> Fix For: 4.3.0
>
> Attachments: 1-BOOKKEEPER-629.patch, 10-BOOKKEEPER-629.patch,
> 2-BOOKKEEPER-629.patch, 3-BOOKKEEPER-629.patch, 4-BOOKKEEPER-629.patch,
> 5-BOOKKEEPER-629.patch, 6-BOOKKEEPER-629.patch, 7-BOOKKEEPER-629.patch,
> 9-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 was sent by Atlassian JIRA
(v6.2#6252)