HDFS-16893. Standardize the usage of DFSClient debug log (#5303)

Co-authored-by: Zhtttylz <hualong.z@hotmail.com>
Reviewed-by: Ayush Saxena <ayushsaxena@apache.org>
Signed-off-by: Shilun Fan <slfan1989@apache.org>
This commit is contained in:
zhtttylz 2023-01-19 07:56:41 +08:00 committed by GitHub
parent 04f3573f6a
commit 72b760130a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 12 deletions

View File

@ -293,9 +293,7 @@ private void flipDataBuffers() {
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();

View File

@ -135,16 +135,12 @@ public static void cloneDelegationTokenForLogicalUri(
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);
}
}
}

View File

@ -342,7 +342,7 @@ public void run() {
}
if ((i & 0xFF) == 0) {
LOG.info("randomRecycler sleep, i=" + i);
LOG.info("randomRecycler sleep, i={}", i);
sleepMs(100);
}
}