hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhr...@apache.org
Subject svn commit: r921697 - in /hadoop/hdfs/trunk: CHANGES.txt src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
Date Thu, 11 Mar 2010 06:05:49 GMT
Author: dhruba
Date: Thu Mar 11 06:05:48 2010
New Revision: 921697

URL: http://svn.apache.org/viewvc?rev=921697&view=rev
Log:
HDFS-850. The WebUI displays more details about namenode memory usage.
(Dmytro Molkov via dhruba)


Modified:
    hadoop/hdfs/trunk/CHANGES.txt
    hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java

Modified: hadoop/hdfs/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/CHANGES.txt?rev=921697&r1=921696&r2=921697&view=diff
==============================================================================
--- hadoop/hdfs/trunk/CHANGES.txt (original)
+++ hadoop/hdfs/trunk/CHANGES.txt Thu Mar 11 06:05:48 2010
@@ -92,6 +92,9 @@ Trunk (unreleased changes)
     HDFS-729. NameNode API to list files that have missing blocks.
     (Rodrigo Schmidt via dhruba)
 
+    HDFS-850. The WebUI display more details about namenode memory usage.
+    (Dmytro Molkov via dhruba)
+
   OPTIMIZATIONS
 
     HDFS-946. NameNode should not return full path name when lisitng a

Modified: hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
URL: http://svn.apache.org/viewvc/hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java?rev=921697&r1=921696&r2=921697&view=diff
==============================================================================
--- hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
(original)
+++ hadoop/hdfs/trunk/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
Thu Mar 11 06:05:48 2010
@@ -68,8 +68,15 @@ class NamenodeJspHelper {
     MemoryUsage heap = mem.getHeapMemoryUsage();
     long totalMemory = heap.getUsed();
     long maxMemory = heap.getMax();
+    long commitedMemory = heap.getCommitted();
+    
+    MemoryUsage nonHeap = mem.getNonHeapMemoryUsage();
+    long totalNonHeap = nonHeap.getUsed();
+    long maxNonHeap = nonHeap.getMax();
+    long commitedNonHeap = nonHeap.getCommitted();
 
-    long used = (totalMemory * 100) / maxMemory;
+    long used = (totalMemory * 100) / commitedMemory;
+    long usedNonHeap = (totalNonHeap * 100) / commitedNonHeap;
 
     String str = inodes + " files and directories, " + blocks + " blocks = "
         + (inodes + blocks) + " total";
@@ -77,8 +84,16 @@ class NamenodeJspHelper {
       long pct = ((inodes + blocks) * 100) / maxobjects;
       str += " / " + maxobjects + " (" + pct + "%)";
     }
-    str += ".  Heap Size is " + StringUtils.byteDesc(totalMemory) + " / "
-        + StringUtils.byteDesc(maxMemory) + " (" + used + "%) <br>";
+    str += ".<br>";
+    str += "Heap Memory used " + StringUtils.byteDesc(totalMemory) + " is "
+        + " " + used + "% of Commited Heap Memory " 
+        + StringUtils.byteDesc(commitedMemory)
+        + ". Max Heap Memory is " + StringUtils.byteDesc(maxMemory) +
+        ". <br>";
+    str += "Non Heap Memory used " + StringUtils.byteDesc(totalNonHeap) + " is"
+        + " " + usedNonHeap + "% of " + " Commited Non Heap Memory "
+        + StringUtils.byteDesc(commitedNonHeap) + ". Max Non Heap Memory is "
+        + StringUtils.byteDesc(maxNonHeap) + ".<br>";
     return str;
   }
 



Mime
View raw message