diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java index 1233c033ee0..931c2bba36a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSStripedOutputStream.java @@ -293,9 +293,7 @@ public class DFSStripedOutputStream extends DFSOutputStream DataChecksum checksum, String[] favoredNodes) throws IOException { super(dfsClient, src, stat, flag, progress, checksum, favoredNodes, false); - if (LOG.isDebugEnabled()) { - LOG.debug("Creating DFSStripedOutputStream for " + src); - } + LOG.debug("Creating DFSStripedOutputStream for {}", src); ecPolicy = stat.getErasureCodingPolicy(); final int numParityBlocks = ecPolicy.getNumParityUnits(); diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/HAUtilClient.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/HAUtilClient.java index 47288f77df8..bfbee41d144 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/HAUtilClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/HAUtilClient.java @@ -135,16 +135,12 @@ public class HAUtilClient { HdfsConstants.HDFS_URI_SCHEME) + "//" + specificToken.getService()); ugi.addToken(alias, specificToken); - if (LOG.isDebugEnabled()) { - LOG.debug("Mapped HA service delegation token for logical URI " + - haUri + " to namenode " + singleNNAddr); - } + LOG.debug("Mapped HA service delegation token for logical URI {}" + + " to namenode {}", haUri, singleNNAddr); } } else { - if (LOG.isDebugEnabled()) { - LOG.debug("No HA service delegation token found for logical URI " + - haUri); - } + LOG.debug("No HA service delegation token found for logical URI {}", + haUri); } } } diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/test/java/org/apache/hadoop/hdfs/util/TestByteArrayManager.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/test/java/org/apache/hadoop/hdfs/util/TestByteArrayManager.java index a47ffa77136..b624f18bd14 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/test/java/org/apache/hadoop/hdfs/util/TestByteArrayManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/test/java/org/apache/hadoop/hdfs/util/TestByteArrayManager.java @@ -342,7 +342,7 @@ public class TestByteArrayManager { } if ((i & 0xFF) == 0) { - LOG.info("randomRecycler sleep, i=" + i); + LOG.info("randomRecycler sleep, i={}", i); sleepMs(100); } }