Quellcode durchsuchen

HDFS-3611. NameNode prints unnecessary WARNs about edit log normally skipping a few bytes. Contributed by Colin Patrick McCabe. (harsh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1360001 13f79535-47bb-0310-9956-ffa450edef68
Harsh J vor 13 Jahren
Ursprung
Commit
2c27b5826d

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -298,6 +298,8 @@ Branch-2 ( Unreleased changes )
     HDFS-3613. GSet prints some INFO level values, which aren't
     really very useful to all (Andrew Wang via harsh)
 
+    HDFS-3611. NameNode prints unnecessary WARNs about edit log normally skipping a few bytes. (Colin Patrick McCabe via harsh)
+
   OPTIMIZATIONS
 
     HDFS-2982. Startup performance suffers when there are many edit log

+ 5 - 3
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileInputStream.java

@@ -194,9 +194,11 @@ public class EditLogFileInputStream extends EditLogInputStream {
           //
           long skipAmt = log.length() - tracker.getPos();
           if (skipAmt > 0) {
-            LOG.warn("skipping " + skipAmt + " bytes at the end " +
-              "of edit log  '" + getName() + "': reached txid " + txId +
-              " out of " + lastTxId);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("skipping " + skipAmt + " bytes at the end " +
+                  "of edit log  '" + getName() + "': reached txid " + txId +
+                  " out of " + lastTxId);
+            }
             tracker.clearLimit();
             IOUtils.skipFully(tracker, skipAmt);
           }