[ 
https://issues.apache.org/jira/browse/HDFS-13610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16545532#comment-16545532
 ] 

Erik Krogen commented on HDFS-13610:
------------------------------------

Sorry for my late reply; I just returned from vacation.

[~csun], thanks for the review!
# Agree with Konstantin's response here. A negative {{lowestTxnId}} has a 
special meaning that the cache is completely empty. The {{initialize(-1)}} in 
the constructor basically just places dummy values. I changed this to a 
constant and use equality-comparisons rather than less-than to make this 
explicit.
# Agree with both of you; I created a constant and changed it to 0.
# Agreed with Chao. [~shv], it already logs both the new and old layout 
versions. I added {{newStartTxn}} as well.
# It was initially present in {{JournalTestUtil}} to export 
{{getJournaledEditsCache()}} outside of the package, but since it is now only 
used within {{JournalTestUtil}} itself, it can safely be removed. Good catch.
# Yes, thanks for noticing. I need to make sure to incorporate this as a habit.
# According to [Oracle's 
conventions|http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-141388.html],
 there should be two blanks here. But a quick perusal of other Hadoop classes 
shows that there is only 1 blank. I'll match Hadoop style in 
{{JournalTestUtil}} and {{JournaledEditsCache}}.
# Good catch
# The only two cases where there isn't an associated log message is in the 
constructor, and upon the first put into an empty cache. I'll add a log message 
to the latter case. I also updated some other log messages to make it obvious 
that the cache is being cleared.

Attached v004 patch with above changes.

> [Edit Tail Fast Path Pt 4] Cleanup: integration test, documentation, remove 
> unnecessary dummy sync
> --------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-13610
>                 URL: https://issues.apache.org/jira/browse/HDFS-13610
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: ha, journal-node, namenode
>            Reporter: Erik Krogen
>            Assignee: Erik Krogen
>            Priority: Major
>         Attachments: HDFS-13610-HDFS-12943.000.patch, 
> HDFS-13610-HDFS-12943.001.patch, HDFS-13610-HDFS-12943.002.patch, 
> HDFS-13610-HDFS-12943.003.patch, HDFS-13610-HDFS-12943.004.patch
>
>
> See HDFS-13150 for full design.
> This JIRA is targeted at cleanup tasks:
> * Add in integration testing. We can expand {{TestStandbyInProgressTail}}
> * Documentation in HDFSHighAvailabilityWithQJM
> * Remove the dummy sync added as part of HDFS-10519; it is unnecessary since 
> now in-progress tailing does not rely on the JN committedTxnId
> A few bugs are also fixed:
> * Due to changes in HDFS-13609 to enable use of the RPC mechanism whenever 
> inProgressOK is true, there were codepaths which would use the RPC mechanism 
> even when dfs.ha.tail-edits.in-progress was false, meaning that the JNs did 
> not enable the cache. Update the QJM logic to only use selectRpcInputStreams 
> if this config is true.
> * Fix a false error logged when the layout version changes
> * Fix the logging when a layout version change occurs to avoid printing out a 
> placeholder value (Integer.MAX_VALUE)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to