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

hemanthboyina pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 528a799  HDFS-15229. Truncate info should be logged at INFO level. 
Contributed by Ravuri Sushma sree.
528a799 is described below

commit 528a799a784c95cc702e3547a8a294f00743533b
Author: hemanthboyina <[email protected]>
AuthorDate: Sun Aug 2 12:02:37 2020 +0530

    HDFS-15229. Truncate info should be logged at INFO level. Contributed by 
Ravuri Sushma sree.
---
 .../java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java   | 2 +-
 .../org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java   | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
index 72ece88..c0cbabb 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
@@ -2270,7 +2270,7 @@ public class FSNamesystem implements Namesystem, 
FSNamesystemMBean,
     requireEffectiveLayoutVersionForFeature(Feature.TRUNCATE);
     FSDirTruncateOp.TruncateResult r = null;
     try {
-      NameNode.stateChangeLog.debug(
+      NameNode.stateChangeLog.info(
           "DIR* NameSystem.truncate: src={} newLength={}", src, newLength);
       if (newLength < 0) {
         throw new HadoopIllegalArgumentException(
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
index b42252d..3f1fb5a 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
@@ -1100,10 +1100,8 @@ public class NameNodeRpcServer implements 
NamenodeProtocols {
   public boolean truncate(String src, long newLength, String clientName)
       throws IOException {
     checkNNStartup();
-    if(stateChangeLog.isDebugEnabled()) {
-      stateChangeLog.debug("*DIR* NameNode.truncate: " + src + " to " +
-          newLength);
-    }
+    stateChangeLog
+        .debug("*DIR* NameNode.truncate: " + src + " to " + newLength);
     String clientMachine = getClientMachine();
     try {
       return namesystem.truncate(


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to