This is an automated email from the ASF dual-hosted git repository.
sodonnell pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 72e48ac84e7 HDFS-16530. setReplication debug log creates a new string
even if debug is disabled (#4142)
72e48ac84e7 is described below
commit 72e48ac84e7c98b85dd1cfde40541f491e838848
Author: Stephen O'Donnell <[email protected]>
AuthorDate: Wed Apr 6 08:49:52 2022 +0100
HDFS-16530. setReplication debug log creates a new string even if debug is
disabled (#4142)
(cherry picked from commit bbfe3500cf76ce661e0b10bb5d16cb419f9b9b10)
---
.../main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java
index 363f8898f51..d65b84cc610 100644
---
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java
+++
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirAttrOp.java
@@ -410,7 +410,7 @@ public class FSDirAttrOp {
bm.setReplication(oldBR, targetReplication, b);
}
- if (oldBR != -1) {
+ if (oldBR != -1 && FSDirectory.LOG.isDebugEnabled()) {
if (oldBR > targetReplication) {
FSDirectory.LOG.debug("Decreasing replication from {} to {} for {}",
oldBR, targetReplication, iip.getPath());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]