HBASE-11559 Add dumping of DATA block usage to the BlockCache JSON report

This commit is contained in:
stack 2014-07-22 10:21:37 -07:00
parent d8faab2fff
commit 549a8ee219
2 changed files with 11 additions and 1 deletions

View File

@ -318,6 +318,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>
<tr>
<td>Mean</td>

View File

@ -53,7 +53,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>