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

Chao Sun commented on HDFS-13791:
---------------------------------

Thanks [~xkrogen]. The change of using {{SummaryStatistics}} looks good. 
Regarding the change on {{LimitedFrequencyLogHelper}}, I'm wondering instead of 
having a parent log helper, whether we could keep a map from action name to the 
actions in the log helper, and then we can do something like:

{code}
      LogAction preLogAction =
          loadEditLogHelper.logAtTime("pre", startTime, maxTxnsToRead);
      ...
      LogAction postLogAction = loadEditLogHelper
          .log("post", numEdits, edits.length(), monotonicNow() - startTime);
{code}


bq. Also, since this has refactoring, we probably need to put the relevant 
portion of it into trunk (i.e. the new class and the FSNamesystemLock changes).

Yes agree we can put this in the trunk first.

> Limit logging frequency of edit tail related statements
> -------------------------------------------------------
>
>                 Key: HDFS-13791
>                 URL: https://issues.apache.org/jira/browse/HDFS-13791
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: hdfs, qjm
>            Reporter: Erik Krogen
>            Assignee: Erik Krogen
>            Priority: Major
>         Attachments: HDFS-13791-HDFS-12943.000.patch, 
> HDFS-13791-HDFS-12943.001.patch
>
>
> There are a number of log statements that occur every time new edits are 
> tailed by a Standby NameNode. When edits are tailing only on the order of 
> every tens of seconds, this is fine. With the work in HDFS-13150, however, 
> edits may be tailed every few milliseconds, which can flood the logs with 
> tailing-related statements. We should throttle it to limit it to printing at 
> most, say, once per 5 seconds.
> We can implement logic similar to that used in HDFS-10713. This may be 
> slightly more tricky since the log statements are distributed across a few 
> classes.



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

---------------------------------------------------------------------
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