[ https://issues.apache.org/jira/browse/HDFS-14103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16701036#comment-16701036 ]
BELUGA BEHR commented on HDFS-14103: ------------------------------------ Example: no 'null' guard: https://github.com/apache/hadoop/blob/27978bcb66a9130cbf26d37ec454c0b7fcdc2530/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockPlacementPolicyDefault.java#L895-L904 But ya, if debug logging is enabled, there will be a builder there, so no reason to double-check: {code} StringBuilder builder = null; if (LOG.isDebugEnabled()) { builder = debugLoggingBuilder.get(); builder.setLength(0); builder.append("["); } {code} > Review Logging of BlockPlacementPolicyDefault > --------------------------------------------- > > Key: HDFS-14103 > URL: https://issues.apache.org/jira/browse/HDFS-14103 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: BELUGA BEHR > Assignee: BELUGA BEHR > Priority: Minor > Attachments: HDFS-14103.1.patch > > > Review use of SLF4J in {{BlockPlacementPolicyDefault.java}} > Other minor logging improvements. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org