You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by so...@apache.org on 2022/04/06 10:57:51 UTC

[hadoop] branch branch-3.3 updated: HDFS-16530. setReplication debug log creates a new string even if debug is disabled (#4142)

This is an automated email from the ASF dual-hosted git repository.

sodonnell pushed a commit to branch branch-3.3
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.3 by this push:
     new bd0dbf319ab HDFS-16530. setReplication debug log creates a new string even if debug is disabled (#4142)
bd0dbf319ab is described below

commit bd0dbf319abda642621cd35272b75626f4004605
Author: Stephen O'Donnell <st...@gmail.com>
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 173348f3564..5c347655fc8 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
@@ -408,7 +408,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: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org