[
https://issues.apache.org/jira/browse/HDFS-3765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431617#comment-13431617
]
Vinay commented on HDFS-3765:
-----------------------------
{quote}"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{quote}
Ok. I will do it.
{quote}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.{quote}
Ok. I will use "automatic sync"
{quote}Otherwise the END_LOG_SEGMENT transaction doesn't end up logged in
shared edits, and you end up with a one-op gap in between every segment.{quote}
Here {{newSharedEditLog.endCurrentLogSegment(true)}} call itself will log
END_LOG_SEGMENT based on the boolean we passed.
Here is the code inside {{FSEditLog.endCurrentLogSegment(boolean)}}
{code}if (writeEndTxn) {
logEdit(LogSegmentOp.getInstance(cache.get(),
FSEditLogOpCodes.OP_END_LOG_SEGMENT));
logSync();
}{code}
No need to explicitly write END_LOG_SEGMENT op.
{quote}Oh, and please remove the now-unused imports in NameNode.java as
well.{quote}
Sure.
{quote}Here's a rev with some of the above changes. Also fixed
TestBookKeeperAsHASharedDir to properly reset the ExitException in a @Before
method.{quote}
Here I didn't find method {{ExitUtil.resetFirstExitException()}} in
ExitUtil.java
I had run the same Unit tests, all had passed here. Anyway I will run unit
tests one more time, before posting the patch.
> 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, hdfs-3765.txt
>
>
> 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