Browse Source

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
Suresh Srinivas 11 years ago
parent
commit
b1d6574a11

+ 2 - 0
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)

+ 5 - 2
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/LightWeightGSet.java

@@ -348,8 +348,11 @@ public class LightWeightGSet<K, E extends K> implements GSet<K, E> {
 
     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;
   }