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

Jinglun commented on HDFS-16083:
--------------------------------

Hi [~lei w], thanks your patch, some comments.

In EditLogTailer.java:
 # I prefer using `shouldRollLog` instead of avoidTriggerActiveLogRoll. 
{code:java}
if (shouldRollLog && tooLongSinceLastLoad() &&
    lastRollTriggerTxId < lastLoadedTxnId) {{code}

In TestStandbyRollEditsLogOnly.java:
 # The test case and setup method should not be static.
 # We need a License for the new file.

In TestStandbyRollEditsLogOnly#testOnlyStandbyRollEditlog:
 # When you compare observerRollTimeMs1, could you use assertEquals instead of 
assertTrue.
 # The message of the assert should be more specific. Something like: "Standby 
should roll the log." and "The observer is not expected to roll the log."
 # I'd prefer using standbyInitialRollTime and standbyLastRollTime instead of 
using numbers standbyRollTimeMs1 and standbyRollTimeMs2.
 # The sleep time is too long, can we make it faster ?  

In TestStandbyRollEditsLogOnly#testTransObToStandbyThenRollLog:
 # It fails, could you give it a check.
 # The verify logic is very like testOnlyStandbyRollEditlog, can we extract the 
same part as a new method.
 # The idea of this test is good. We can transition the state and verify roll 
edit more times. May be do it 3 times ?

There is also some checkstyle issue. Please follow jenkins suggestions. I'll 
re-submit v03 as v04 to trigger jenkins.

> Forbid Observer NameNode trigger  active namenode log roll
> ----------------------------------------------------------
>
>                 Key: HDFS-16083
>                 URL: https://issues.apache.org/jira/browse/HDFS-16083
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namanode
>            Reporter: lei w
>            Assignee: lei w
>            Priority: Minor
>         Attachments: HDFS-16083.001.patch, HDFS-16083.002.patch, 
> HDFS-16083.003.patch, activeRollEdits.png
>
>
> When the Observer NameNode is turned on in the cluster, the Active NameNode 
> will receive rollEditLog RPC requests from the Standby NameNode and Observer 
> NameNode in a short time. Observer NameNode's rollEditLog request is a 
> repetitive operation, so should we forbid Observer NameNode trigger  active 
> namenode log roll ? We  'dfs.ha.log-roll.period' configured is 300( 5 
> minutes) and active NameNode receives rollEditLog RPC as shown in 
> activeRollEdits.png



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to