From 6ff0e1fc3a1286d0927768433d0f9266629ce805 Mon Sep 17 00:00:00 2001 From: Harsh J Date: Wed, 11 Jul 2012 03:37:55 +0000 Subject: [PATCH] Backport of HDFS-3611 from trunk. svn merge -c 1360001 ../../trunk (harsh) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1360002 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ .../hdfs/server/namenode/EditLogFileInputStream.java | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 83c5801a90a..2b6d5e0e0a3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -121,6 +121,8 @@ Release 2.0.1-alpha - UNRELEASED 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 diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileInputStream.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileInputStream.java index dce51c62f6e..f9ba017c96a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileInputStream.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/EditLogFileInputStream.java @@ -164,9 +164,11 @@ public class EditLogFileInputStream extends EditLogInputStream { // long skipAmt = file.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); }