[
https://issues.apache.org/jira/browse/BOOKKEEPER-629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13697503#comment-13697503
]
Sijie Guo commented on BOOKKEEPER-629:
--------------------------------------
{quote}
With UUID, the advantage is user can change hostname or IP or port easily
without affecting bookie entities.
{quote}
somehow, the UUID breaks one of the functions of Cookie. Two processes has the
ability to listen on different ports using same UUID accessing same directories
by a mistake operation, which might corrupt data. so if you guys feel strongly
to introduce UUID, you'd need to provide a locking mechanism to prevent two
bookies running at the same time accessing same data directories.
go back to the debate of using 'hostname:port' or using UUID. either
'hostname:port' identifier or UUID has its pros and cons. using 'hostname:port'
is quite straightforward for debugging when you looking into its ledger
metadata in zookeeper or looking to the available bookies znode. using UUID
could gain the benefits as you described, but the question is how frequently
you would change the hostname, IP or port? is it worth giving up the
flexibility that 'hostname:port' gave?
if the idea is just to inject the {host, ip, port} information, you don't need
to change 'hostname:port' identifier format. during first start time, you could
generate the identifier based on 'hostname:port'. so the identifier is still
backward compatible with old version clients. After that, the bookie keeps
using this identifier, you could let new bookie inject {its host, ip, port}
into its registration znode. so old bookie client could still use znode name to
connect, new bookie client could try read content in its registration znode
first. if its empty, it is an old bookie znode, so fallback to use znode name;
if its not empty, it is a new bookie znode, use the content.
but you still need the admin tool to have the ability to allow people changing
identifier.
> 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: Sub-task
> Components: bookkeeper-auto-recovery, 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, 2-BOOKKEEPER-629.patch,
> 3-BOOKKEEPER-629.patch, 4-BOOKKEEPER-629.patch, 5-BOOKKEEPER-629.patch,
> 6-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