[
https://issues.apache.org/jira/browse/HDFS-9618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085371#comment-15085371
]
Kai Zheng commented on HDFS-9618:
---------------------------------
Good catch! The pattern to use {{logger.isInfoEnabled}} shouldn't be used for
no reason. I guess the case in question uses the condition
{{blockLog.isInfoEnabled()}} to decide to compose and write the log message or
not for performance consideration. Then is there any reason for the following
block? Better to change it by the way in the fix.
{code}
if (blockLog.isDebugEnabled()) {
blockLog.debug("BLOCK* neededReplications = {} pendingReplications = {}",
neededReplications.size(), pendingReplications.size());
}
{code}
> Fix mismatch between log level and guard in
> BlockManager#computeRecoveryWorkForBlocks
> -------------------------------------------------------------------------------------
>
> Key: HDFS-9618
> URL: https://issues.apache.org/jira/browse/HDFS-9618
> Project: Hadoop HDFS
> Issue Type: Bug
> Affects Versions: 3.0.0
> Reporter: Masatake Iwasaki
> Assignee: Masatake Iwasaki
> Priority: Minor
>
> Debug log message is constructed when {{Logger#isInfoEnabled}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)