From c81aed0271d19cba404fc51572dd8d8a75266f67 Mon Sep 17 00:00:00 2001 From: Harsh J Date: Wed, 11 Jul 2012 03:15:03 +0000 Subject: [PATCH] HDFS-3613. GSet prints some INFO level values, which aren't really very useful to all. Contributed by Andrew Wang. (harsh) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1359999 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hadoop/hdfs/server/blockmanagement/BlocksMap.java | 10 ++++++---- .../org/apache/hadoop/hdfs/util/LightWeightGSet.java | 4 +++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 4e1b1dcb2d9..e444cf32a96 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -295,6 +295,9 @@ Branch-2 ( Unreleased changes ) HDFS-3629. Fix the typo in the error message about inconsistent storage layout version. (Brandon Li via harsh) + HDFS-3613. GSet prints some INFO level values, which aren't + really very useful to all (Andrew Wang 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/blockmanagement/BlocksMap.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java index 6757ef486b0..7405240ca1b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlocksMap.java @@ -81,10 +81,12 @@ class BlocksMap { final int exponent = e2 < 0? 0: e2 > 30? 30: e2; final int c = 1 << exponent; - LightWeightGSet.LOG.info("VM type = " + vmBit + "-bit"); - LightWeightGSet.LOG.info("2% max memory = " + twoPC/(1 << 20) + " MB"); - LightWeightGSet.LOG.info("capacity = 2^" + exponent - + " = " + c + " entries"); + if (LightWeightGSet.LOG.isDebugEnabled()) { + LightWeightGSet.LOG.debug("VM type = " + vmBit + "-bit"); + LightWeightGSet.LOG.debug("2% max memory = " + twoPC/(1 << 20) + " MB"); + LightWeightGSet.LOG.debug("capacity = 2^" + exponent + + " = " + c + " entries"); + } return c; } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightGSet.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightGSet.java index 28f59e409fd..32d80c25516 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightGSet.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/util/LightWeightGSet.java @@ -79,7 +79,9 @@ public class LightWeightGSet implements GSet { */ public LightWeightGSet(final int recommended_length) { final int actual = actualArrayLength(recommended_length); - LOG.info("recommended=" + recommended_length + ", actual=" + actual); + if (LOG.isDebugEnabled()) { + LOG.debug("recommended=" + recommended_length + ", actual=" + actual); + } entries = new LinkedElement[actual]; hash_mask = entries.length - 1;