[
https://issues.apache.org/jira/browse/HBASE-12393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ChiaPing Tsai updated HBASE-12393:
----------------------------------
Component/s: (was: regionserver)
UI
Description:
The CacheConfig.getBlockCache() will return the null point when we set
hfile.block.cache.size to zero.
The BlockCacheTmpl.jamon doesn't make a check on null blockcache.
{code}
<%if cacheConfig == null %>
<p>CacheConfig is null</p>
<%else>
<table class="table table-striped">
<tr>
<th>Attribute</th>
<th>Value</th>
<th>Description</th>
</tr>
<tr>
<td>Size</td>
<td><% StringUtils.humanReadableInt(cacheConfig.getBlockCache().size())
%></td>
<td>Total size of Block Cache (bytes)</td>
</tr>
<tr>
<td>Free</td>
<td><%
StringUtils.humanReadableInt(cacheConfig.getBlockCache().getFreeSize()) %></td>
<td>Free space in Block Cache (bytes)</td>
</tr>
<tr>
<td>Count</td>
<td><% String.format("%,d",
cacheConfig.getBlockCache().getBlockCount()) %></td>
<td>Number of blocks in Block Cache</td>
</tr>
<tr>
<td>Evicted</td>
<td><% String.format("%,d",
cacheConfig.getBlockCache().getStats().getEvictedCount()) %></td>
<td>Number of blocks evicted</td>
</tr>
<tr>
<td>Evictions</td>
<td><% String.format("%,d",
cacheConfig.getBlockCache().getStats().getEvictionCount()) %></td>
<td>Number of times an eviction occurred</td>
</tr>
<tr>
<td>Hits</td>
<td><% String.format("%,d",
cacheConfig.getBlockCache().getStats().getHitCount()) %></td>
<td>Number requests that were cache hits</td>
</tr>
<tr>
<td>Hits Caching</td>
<td><% String.format("%,d",
cacheConfig.getBlockCache().getStats().getHitCachingCount()) %></td>
<td>Cache hit block requests but only requests set to use Block
Cache</td>
</tr>
<tr>
<td>Misses</td>
<td><% String.format("%,d",
cacheConfig.getBlockCache().getStats().getMissCount()) %></td>
<td>Number of requests that were cache misses</td>
</tr>
<tr>
<td>Misses Caching</td>
<td><% String.format("%,d",
cacheConfig.getBlockCache().getStats().getMissCount()) %></td>
<td>Block requests that were cache misses but only requests set to use
Block Cache</td>
</tr>
<tr>
<td>Hit Ratio</td>
<td><% String.format("%,.2f",
cacheConfig.getBlockCache().getStats().getHitRatio() * 100) %><% "%" %></td>
<td>Hit Count divided by total requests count</td>
</tr>
{code}
was:
The CacheConfig.getBlockCache() will return the null point when we set
hfile.block.cache.size to zero.
It caused the BlockCacheTmplImpl.java:123 to throw null exception.
{code}
org.jamon.escaping.Escaping.HTML.write(org.jamon.emit.StandardEmitter.valueOf(StringUtils.humanReadableInt(cacheConfig.getBlockCache().size())),
jamonWriter);
{code}
Labels: (was: patch)
> The regionserver web will throw exception if we disable block cache
> -------------------------------------------------------------------
>
> Key: HBASE-12393
> URL: https://issues.apache.org/jira/browse/HBASE-12393
> Project: HBase
> Issue Type: Bug
> Components: UI
> Affects Versions: 0.98.7
> Environment: ubuntu 12.04 64bits, hadoop-2.2.0, hbase-0.98.7-hadoop2
> Reporter: ChiaPing Tsai
> Priority: Minor
> Attachments: HBASE-12393.patch
>
>
> The CacheConfig.getBlockCache() will return the null point when we set
> hfile.block.cache.size to zero.
> The BlockCacheTmpl.jamon doesn't make a check on null blockcache.
> {code}
> <%if cacheConfig == null %>
> <p>CacheConfig is null</p>
> <%else>
> <table class="table table-striped">
> <tr>
> <th>Attribute</th>
> <th>Value</th>
> <th>Description</th>
> </tr>
> <tr>
> <td>Size</td>
> <td><%
> StringUtils.humanReadableInt(cacheConfig.getBlockCache().size()) %></td>
> <td>Total size of Block Cache (bytes)</td>
> </tr>
> <tr>
> <td>Free</td>
> <td><%
> StringUtils.humanReadableInt(cacheConfig.getBlockCache().getFreeSize())
> %></td>
> <td>Free space in Block Cache (bytes)</td>
> </tr>
> <tr>
> <td>Count</td>
> <td><% String.format("%,d",
> cacheConfig.getBlockCache().getBlockCount()) %></td>
> <td>Number of blocks in Block Cache</td>
> </tr>
> <tr>
> <td>Evicted</td>
> <td><% String.format("%,d",
> cacheConfig.getBlockCache().getStats().getEvictedCount()) %></td>
> <td>Number of blocks evicted</td>
> </tr>
> <tr>
> <td>Evictions</td>
> <td><% String.format("%,d",
> cacheConfig.getBlockCache().getStats().getEvictionCount()) %></td>
> <td>Number of times an eviction occurred</td>
> </tr>
> <tr>
> <td>Hits</td>
> <td><% String.format("%,d",
> cacheConfig.getBlockCache().getStats().getHitCount()) %></td>
> <td>Number requests that were cache hits</td>
> </tr>
> <tr>
> <td>Hits Caching</td>
> <td><% String.format("%,d",
> cacheConfig.getBlockCache().getStats().getHitCachingCount()) %></td>
> <td>Cache hit block requests but only requests set to use Block
> Cache</td>
> </tr>
> <tr>
> <td>Misses</td>
> <td><% String.format("%,d",
> cacheConfig.getBlockCache().getStats().getMissCount()) %></td>
> <td>Number of requests that were cache misses</td>
> </tr>
> <tr>
> <td>Misses Caching</td>
> <td><% String.format("%,d",
> cacheConfig.getBlockCache().getStats().getMissCount()) %></td>
> <td>Block requests that were cache misses but only requests set to
> use Block Cache</td>
> </tr>
> <tr>
> <td>Hit Ratio</td>
> <td><% String.format("%,.2f",
> cacheConfig.getBlockCache().getStats().getHitRatio() * 100) %><% "%" %></td>
> <td>Hit Count divided by total requests count</td>
> </tr>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)