Repository: hbase
Updated Branches:
  refs/heads/0.98 05f28d936 -> 2cd7b2a85
  refs/heads/branch-1 962cbd188 -> 3b93a81ff
  refs/heads/master 226672c55 -> 3ea48f73d


HBASE-11559 Add dumping of DATA block usage to the BlockCache JSON report 
(Michael Stack)

Amending-Author: Andrew Purtell <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/c4d15e47
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/c4d15e47
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/c4d15e47

Branch: refs/heads/0.98
Commit: c4d15e476a36be4d02ad1e82913e738dc3c69b25
Parents: 05f28d9
Author: stack <[email protected]>
Authored: Tue Jul 22 10:21:37 2014 -0700
Committer: Andrew Purtell <[email protected]>
Committed: Tue Jul 22 13:06:46 2014 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon   | 10 ++++++++++
 .../hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon      |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/c4d15e47/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
index 5e94279..a042318 100644
--- 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
+++ 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
@@ -325,6 +325,16 @@ are combined counts. Request count is sum of hits and 
misses.</p>
         <td>Size of DATA Blocks</td>
     </tr>
 </%if>
+    <tr>
+        <td>Evicted</td>
+        <td><% String.format("%,d", bc.getStats().getEvictedCount()) %></td>
+        <td>The total number of blocks evicted</td>
+    </tr>
+    <tr>
+        <td>Evictions</td>
+        <td><% String.format("%,d", bc.getStats().getEvictionCount()) %></td>
+        <td>The total number of times an eviction has occurred</td>
+    </tr>
 <%doc>Can't do age of block in cache when slab cache</%doc>
 <%if !slabCache %>
     <tr>

http://git-wip-us.apache.org/repos/asf/hbase/blob/c4d15e47/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon
 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon
index 50da12a..6fc24b2 100644
--- 
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon
+++ 
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon
@@ -55,7 +55,7 @@ com.yammer.metrics.stats.Snapshot;
   }
   CachedBlocksByFile cbsbf = BlockCacheUtil.getLoadedCachedBlocksByFile(conf, 
bc);
 </%java>
-<%if bcv.equals("file") %><& bc_by_file; cbsbf = cbsbf; &><%else><% 
BlockCacheUtil.toJSON(bc) %></%if>
+<%if bcv.equals("file") %><& bc_by_file; cbsbf = cbsbf; &><%else>{<% 
BlockCacheUtil.toJSON(bc) %>, <% cbsbf %> }</%if>
 <%java>
 cbsbf = null;
 </%java>

Reply via email to