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
This commit is contained in:
Harsh J 2012-07-11 03:37:07 +00:00
parent c81aed0271
commit 2c27b5826d
2 changed files with 7 additions and 3 deletions

View File

@ -298,6 +298,8 @@ Branch-2 ( Unreleased changes )
HDFS-3613. GSet prints some INFO level values, which aren't HDFS-3613. GSet prints some INFO level values, which aren't
really very useful to all (Andrew Wang via harsh) 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 OPTIMIZATIONS
HDFS-2982. Startup performance suffers when there are many edit log HDFS-2982. Startup performance suffers when there are many edit log

View File

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