[
https://issues.apache.org/jira/browse/BOOKKEEPER-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13413880#comment-13413880
]
Uma Maheswara Rao G commented on BOOKKEEPER-300:
------------------------------------------------
Thanks a lot, Vinay for the patch.
{quote}
# Create the JournalDir and ledger dirs if not exists.
# If Journal directories exist and its not empty, then it will ask for the user
confirmation. On Confirmation it will format all contents of Journal
directories and ledger directories, and recreate the directories.
* Here confirmation will be asked only for the journal directory. If
journal directory is empty or not exists, it will format ledger directory
contents even though its not empty. Because Bookie will never have non-empty
ledger directory with empty journal directory.
{quote}
I think format should just take care of metadata. Storage directories anyway
will be cleaned if there is no metadata presents related to that data.
Going to each bookie and executing format command may be a pain for the admins
when we have more BookKeeper nodes in the cluster ( as it is scalable).
In any BookKeeper node, if admin execute format command, it should just clean
metadata of BookKeeper Server by prompting for the confirmation like how you
did now.
What about others opinion?
And other requirement for format from NameNode is:
JournalManager implementation should support formatting of its respective
storage. Currently NameNode is just skipping the sharedstorage format as there
is no interface defined yet in JournalManager. Aaron and me Discussed some time
back to provide that interface to support format. So, soon we will add that in
JournalManager interface.
So, when namenode calls format, it will call the JournalManager's format
implementation. In the BookKeeper shared storage case, I think we should have
the implementation in BookKeeperJournalManager class. It should be like, check
the metadata in ZK and format it.
This part of implementation should go in BKJM.
Whether BookKeeper client will expose API for format and BKJM will just call
it?
(or)
let BKJM handle it completely as BKJM already holding the zk instance?
We can file the separate JIRA for this case based on the opinions from others.
Thanks
Uma
> Create Bookie format command
> ----------------------------
>
> Key: BOOKKEEPER-300
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-300
> Project: Bookkeeper
> Issue Type: New Feature
> Components: bookkeeper-server
> Affects Versions: 4.0.0
> Reporter: Rakesh R
> Attachments: BOOKKEEPER-300.patch
>
>
> Provide a bookie format command. Then the admin would just have to run the
> command on each machine, which will prepare the bookie env
> +Zookeeper paths (znodes):+
> - ledger's root path
> - bookie's available path
> +Directories:+
> - Journal directories
> - Ledger directories
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira