You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Sen Zhao (JIRA)" <ji...@apache.org> on 2018/02/10 04:11:00 UTC

[jira] [Updated] (MAPREDUCE-7050) Debug logs should be improvement

     [ https://issues.apache.org/jira/browse/MAPREDUCE-7050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sen Zhao updated MAPREDUCE-7050:
--------------------------------
    Description: 
I noticed that in Mapreduced code, there are many places to use Log.debug as follows:

{code}
LOG.debug("example " + example.getClass().getName() + "example" );
{code}

When the system loglevel set higher than Debug, although the system does not print these levels of logs, but each time will splicing parameters string, affect system performance.

It should be:

{code}

if(LOG.isDebugEnabled()){

    LOG.debug("example " + example.getClass().getName() + "example" );

}
{code}

> Debug logs should be improvement
> --------------------------------
>
>                 Key: MAPREDUCE-7050
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-7050
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>            Reporter: Sen Zhao
>            Priority: Minor
>
> I noticed that in Mapreduced code, there are many places to use Log.debug as follows:
> {code}
> LOG.debug("example " + example.getClass().getName() + "example" );
> {code}
> When the system loglevel set higher than Debug, although the system does not print these levels of logs, but each time will splicing parameters string, affect system performance.
> It should be:
> {code}
> if(LOG.isDebugEnabled()){
>     LOG.debug("example " + example.getClass().getName() + "example" );
> }
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org