From b1d6574a113fcee54aefb74d7c701123ebdb990b Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Mon, 25 Nov 2013 19:42:19 +0000 Subject: [PATCH] HADOOP-10126. LightWeightGSet log message is confusing. Contributed by Vinay. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1545376 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 2 ++ .../main/java/org/apache/hadoop/util/LightWeightGSet.java | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index f6196af25e2..141834bd7a2 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -388,6 +388,8 @@ Release 2.3.0 - UNRELEASED HADOOP-10111. Allow DU to be initialized with an initial value (Kihwal Lee via jeagles) + HADOOP-10126. LightWeightGSet log message is confusing. (Vinay via suresh) + OPTIMIZATIONS HADOOP-9748. Reduce blocking on UGI.ensureInitialized (daryn) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LightWeightGSet.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LightWeightGSet.java index 50e291d46c7..f1661d750d7 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LightWeightGSet.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LightWeightGSet.java @@ -348,8 +348,11 @@ public class LightWeightGSet implements GSet { LOG.info("Computing capacity for map " + mapName); LOG.info("VM type = " + vmBit + "-bit"); - LOG.info(percentage + "% max memory = " - + StringUtils.TraditionalBinaryPrefix.long2String(maxMemory, "B", 1)); + LOG.info(percentage + "% max memory " + + StringUtils.TraditionalBinaryPrefix.long2String(maxMemory, "B", 1) + + " = " + + StringUtils.TraditionalBinaryPrefix.long2String((long) percentMemory, + "B", 1)); LOG.info("capacity = 2^" + exponent + " = " + c + " entries"); return c; }