[
https://issues.apache.org/jira/browse/BOOKKEEPER-634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14080401#comment-14080401
]
Sijie Guo commented on BOOKKEEPER-634:
--------------------------------------
{code}
+ final String curBookieIdString[] = args[0].split(":");
+ if (curBookieIdString.length != 2) {
+ System.err.println("BookieId inputted has invalid format" +
"(host:port or ip:port expected): "
+ + args[0]);
+ return -1;
+ }
+ final String toBookieIdString[] = args[1].split(":");
+ if (toBookieIdString.length != 2) {
+ System.err.println("BookieId inputted has invalid format" +
"(host:port or ip:port expected): "
+ + args[0]);
+ return -1;
+ }
+ final BookieSocketAddress curBookieAddr = new
BookieSocketAddress(curBookieIdString[0],
+ Integer.parseInt(toBookieIdString[1]));
+ final BookieSocketAddress toBookieAddr = new
BookieSocketAddress(toBookieIdString[0],
+ Integer.parseInt(toBookieIdString[1]));
{code}
1. You shouldn't construct BookieSocketAddress in your own way. You should use
'new BookieSocketAddress(addrStr);'
2. The way that you get whole ledgers into a set and then issues all reads at
the same time is definitely terrible. You should use the LedgerIterator and do
it iterator by iterator, and you have to bind the outstanding metadata reads
and updates to not overwhelm metadata store (zookeeper).
3. adding timeout to a method isn't a great solution. the method is actually
could be implemented in asynchronous way, so leave the decision to the caller
to decide whether need to timeout or not.
4. ReReadLedgerMetadataCb is a bad name since there isn't re-read behavior.
> Provide admin tool to rename bookie identifier in ledger metadata
> -----------------------------------------------------------------
>
> Key: BOOKKEEPER-634
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-634
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-client, bookkeeper-server
> Affects Versions: 4.2.1
> Reporter: Rakesh R
> Assignee: Rakesh R
> Fix For: 4.3.0
>
> Attachments: 0001-BOOKKEEPER-634-initial-draft-version.patch,
> 001-BOOKKEEPER-634-rename-bookieid-in-ledger.patch,
> BOOKKEEPER-634-rename-bookieid-in-ledger.patch, BOOKKEEPER-634.patch,
> BOOKKEEPER-634.patch
>
>
> This JIRA to discuss about admin tool for changing the bookie's IP to
> hostname.
--
This message was sent by Atlassian JIRA
(v6.2#6252)