[ https://issues.apache.org/jira/browse/BOOKKEEPER-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14086736#comment-14086736 ]
Flavio Junqueira commented on BOOKKEEPER-773: --------------------------------------------- I'm curious to know how often one needs to execute such a command. This is a rare command to use, yes? I also don't like such long names for commands, what about "bkrename" or "renamebookie"? The order of execution in the patch: {noformat} + // creates new cookie and write to zookeeper + Cookie newCookie = cookie.copy(); + newCookie.writeToZooKeeper(zk, newConf); + + LOG.info("Updating cookie file present in journalDirectory {}", journalDirectory); + LOG.info("Updating cookie file present in ledgerDirectories {}", ledgerDirectories); + newCookie.writeToDirectory(journalDirectory); + for (File dir : ledgerDirectories) { + newCookie.writeToDirectory(dir); + } + cookie.deleteFromZooKeeper(zk, conf); {noformat} seems to swap 3 and 4 in this sequence: {noformat} 3. update new cookie into local directories. 4. create new cookie with new zk path with new bookie id 5. delete the old one. {noformat} > 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 > > > 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.2#6252)