From 6c960396937038fa996707fb1a8a3ffa3d26cdc1 Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Wed, 15 Aug 2012 00:33:53 +0000 Subject: [PATCH] HDFS-3803. Change BlockPoolSliceScanner chatty INFO log to DEBUG. Contributed by Andrew Purtell git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1373174 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 64a4fdf568..ccd6dbceb1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -117,6 +117,9 @@ Trunk (unreleased changes) HDFS-3723. Add support -h, -help to all the commands. (Jing Zhao via suresh) + HDFS-3803. Change BlockPoolSliceScanner chatty INFO log to DEBUG. + (Andrew Purtell via suresh) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java index 142880e026..3e6d902223 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java @@ -554,9 +554,11 @@ private synchronized void updateBytesLeft(long len) { } private synchronized void startNewPeriod() { - LOG.info("Starting a new period : work left in prev period : " + if (LOG.isDebugEnabled()) { + LOG.debug("Starting a new period : work left in prev period : " + String.format("%.2f%%", totalBytesToScan == 0 ? 0 : (bytesLeft * 100.0) / totalBytesToScan)); + } // reset the byte counts : bytesLeft = totalBytesToScan;