[
https://issues.apache.org/jira/browse/HDFS-3765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431368#comment-13431368
]
Todd Lipcon commented on HDFS-3765:
-----------------------------------
+ * Use NameNode INTIALIZESHAREDEDITS to initialize the shared edits. i.e.
copy
+ * the edits log segments to new bkjm shared edits.
+ *
+ * @throws Exception
nits:
- "NameNode -initializeSharedEdits" (the command is not generally typed in all
caps)
- capitalize BKJM
- no need for "@throws Exception" since it's redundant with the signature itself
----
{code}
+ newSharedEditLog.logEdit(op);
+ newSharedEditLog.logSync();
{code}
Calling logSync on every edit will make this take a really long time if there
are a non-trivial number of edits to copy. Instead, I think you can avoid
calling logSync, and instead rely on the "automatic sync" feature of the edit
streams to trigger a logSync when the buffer grows too large.
Otherwise looks great.
> Namenode INITIALIZESHAREDEDITS should be able to initialize all shared
> storages
> -------------------------------------------------------------------------------
>
> Key: HDFS-3765
> URL: https://issues.apache.org/jira/browse/HDFS-3765
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: ha
> Affects Versions: 2.1.0-alpha, 3.0.0
> Reporter: Vinay
> Assignee: Vinay
> Attachments: HDFS-3765.patch, HDFS-3765.patch
>
>
> Currently, NameNode INITIALIZESHAREDEDITS provides ability to copy the edits
> files to file schema based shared storages when moving cluster from Non-HA
> environment to HA enabled environment.
> This Jira focuses on the following
> * Generalizing the logic of copying the edits to new shared storage so that
> any schema based shared storage can initialized for HA cluster.
--
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