From 4524655afdc2eecdbc8f69e5723edd516d876e2a Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Thu, 16 Aug 2012 17:13:13 +0000 Subject: [PATCH] HDFS-3194. DataNode block scanner is running too frequently. Contributed by Andy Isaacson git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1373928 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop/hdfs/server/datanode/BlockPoolSliceScanner.java | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 94eb359bd79..159d061c89d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -616,6 +616,9 @@ Branch-2 ( Unreleased changes ) HDFS-3048. Small race in BlockManager#close. (Andy Isaacson via eli) + HDFS-3194. DataNode block scanner is running too frequently. + (Andy Isaacson via eli) + BREAKDOWN OF HDFS-3042 SUBTASKS HDFS-2185. HDFS portion of ZK-based FailoverController (todd) 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 3e6d9022232..55e8ec63b0d 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,11 +554,9 @@ class BlockPoolSliceScanner { } private synchronized void startNewPeriod() { - if (LOG.isDebugEnabled()) { - LOG.debug("Starting a new period : work left in prev period : " + LOG.info("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; @@ -566,7 +564,6 @@ class BlockPoolSliceScanner { } void scanBlockPoolSlice() { - startNewPeriod(); // Create a new processedBlocks structure processedBlocks = new HashMap(); if (!assignInitialVerificationTimes()) {