[
https://issues.apache.org/jira/browse/HDFS-11832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16024344#comment-16024344
]
Akira Ajisaka commented on HDFS-11832:
--------------------------------------
The patch mostly looks good to me. I'm thinking we can remove the guards from
the following code because the methods just return fields.
{code}
LOG.debug("Reported block {} on {} size {} replicaState = {}",
replica, dn, replica.getNumBytes(), reportedState);
{code}
{code}
LOG.debug("Queueing reported block {} in state {}" +
" from datanode {} for later processing because {}.",
block, reportedState, storageInfo.getDatanodeDescriptor(), reason);
{code}
{code}
LOG.debug("Reported block {} on {} size {} replicaState = {}",
block, node, block.getNumBytes(), reportedState);
{code}
{code}
BlockManager.LOG
.debug("Block deletion is delayed during NameNode startup. "
+ "The deletion will start after {} ms.", delay);
{code}
> Switch leftover logs to slf4j format in BlockManager.java
> ---------------------------------------------------------
>
> Key: HDFS-11832
> URL: https://issues.apache.org/jira/browse/HDFS-11832
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: namenode
> Affects Versions: 2.7.0, 2.8.0, 3.0.0-alpha1
> Reporter: Hui Xu
> Assignee: Chen Liang
> Priority: Minor
> Attachments: HDFS-11832.001.patch, HDFS-11832.002.patch,
> HDFS-11832.003.patch, HDFS-11832.004.patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> HDFS-7706 Switch BlockManager logging to use slf4j. But the logging formats
> were not modified appropriately. For example:
> if (LOG.isDebugEnabled()) {
> LOG.debug("blocks = " + java.util.Arrays.asList(blocks));
> }
> These codes should be modified to:
> LOG.debug("blocks = {}", java.util.Arrays.asList(blocks));
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]