hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Dvorzhak (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (MAPREDUCE-7050) Debug logs should be improvement
Date Sat, 10 Feb 2018 04:30:04 GMT

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

Igor Dvorzhak edited comment on MAPREDUCE-7050 at 2/10/18 4:29 AM:
-------------------------------------------------------------------

In case you plan to do a large scale change you may consider to use Log4j v2 with its support
of lazy-logging with Java 8 lambdas ([https://logging.apache.org/log4j/2.x/manual/api.html#LambdaSupport):]
{code:java}
logger.trace("Some long-running operation returned {}", () -> expensiveOperation());
{code}


was (Author: medb):
In case you plan to do a large scale change you can consider to use Log4j v2 with its support
of lazy-logging with Java 8 lambdas (https://logging.apache.org/log4j/2.x/manual/api.html#LambdaSupport):
{code:java}
logger.trace("Some long-running operation returned {}", () -> expensiveOperation());
{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


Mime
View raw message