[
https://issues.apache.org/jira/browse/MAPREDUCE-7007?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16250184#comment-16250184
]
Daniel Templeton commented on MAPREDUCE-7007:
---------------------------------------------
It's probably worth it where there are concatenations. When doing reviews, I
don't tend to flag minor concatenations in unguarded log statements, but I
probably should.
Just be aware that if you try to fix them all in one big patch, you might have
trouble getting the source base to hold still long enough to get the patch
reviewed and committed.
> Add LOG.isDebugEnabled() guard for each LOG.debug()
> ---------------------------------------------------
>
> Key: MAPREDUCE-7007
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-7007
> Project: Hadoop Map/Reduce
> Issue Type: Improvement
> Reporter: Mehran Hassani
> Priority: Minor
>
> I am conducting research on log related bugs. I tried to make a tool to fix
> repetitive yet simple patterns of bugs that are related to logs. In these
> files, there are debug level logging statements containing multiple string
> concatenation without the if statement before them:
> hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestKeyValueTextInputFormat.java,
> LOG.debug("splits["+j+"]="+splits[j]+" count=" + count);, 123
> hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestTextInputFormat.java,
> LOG.debug("splits["+j+"]="+splits[j]+" count=" + count);, 137
> hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestTextInputFormat.java,
> LOG.debug("splits[" + j + "]=" + splits[j] + " count=" + counter);, 254
> hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestTextInputFormat.java,
> LOG.debug("splits["+j+"]="+splits[j]+" count=" + counter);, 315
> hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestMRKeyValueTextInputFormat.java,
> LOG.debug("splits[" + j + "]=" + splits.get(j) +" count=" + count);, 146
> hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/lib/input/TestMRKeyValueTextInputFormat.java,
> LOG.debug("splits["+j+"]="+splits.get(j)+" count=" + count);, 244
> Would you be interested in adding the if before these logging statements?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]