hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiaoyu Yao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-8116) RollingWindowManager#getTopUserForMetric should check if LOG.isDebugEnabled() before LOG.debug()
Date Fri, 10 Apr 2015 05:54:13 GMT

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

Xiaoyu Yao commented on HDFS-8116:
----------------------------------

[~andrew.wang], I don't have a profile for it yet. I'm concerned because the debug log below
is written in a loop of O(#ActiveUser*#Ops). 
{code}
      LOG.debug("offer window of metric: {} userName: {} sum: {}",
          metricName, userName, windowSum);
{code}

If RollingWindowManager class uses SLF4j which does not need to wrap logs in isDebugEnabled(),
we should use this consistently to avoid confusion. Should we remove the check from RollingWindowManager#snapshot?
{code}
    if (LOG.isDebugEnabled()) {
      Set<String> metricNames = metricMap.keySet();
      LOG.debug("iterating in reported metrics, size={} values={}",
          metricNames.size(), metricNames);
    }
{code}

> RollingWindowManager#getTopUserForMetric should check if LOG.isDebugEnabled() before
LOG.debug() 
> -------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-8116
>                 URL: https://issues.apache.org/jira/browse/HDFS-8116
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>            Reporter: Xiaoyu Yao
>            Priority: Trivial
>              Labels: newbie
>
> RollingWindowManager#getTopUserForMetric should check if LOG.isDebugEnabled() before
LOG.debug() 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message