HBASE-8664 Small fix ups for memory size outputs in UI

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1491902 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-06-11 18:53:06 +00:00
parent f05fc3feaf
commit d6becac229
3 changed files with 18 additions and 17 deletions

View File

@ -142,9 +142,9 @@ for (ServerName serverName: serverNames) {
</%java>
<tr>
<td><& serverNameLink; serverName=serverName; serverLoad = sl; &></td>
<td><% sl.getUsedHeapMB() %>MB</td>
<td><% sl.getMaxHeapMB() %>MB</td>
<td><% sl.getMemstoreSizeInMB() %>MB</td>
<td><% sl.getUsedHeapMB() %>m</td>
<td><% sl.getMaxHeapMB() %>m</td>
<td><% sl.getMemstoreSizeInMB() %>m</td>
</tr>
<%java>
@ -218,10 +218,10 @@ if (sl != null) {
<td><& serverNameLink; serverName=serverName; serverLoad = sl; &></td>
<td><% sl.getStores() %></td>
<td><% sl.getStorefiles() %></td>
<td><% sl.getStoreUncompressedSizeMB() %>MB</td>
<td><% sl.getStorefileSizeInMB() %>MB</td>
<td><% sl.getTotalStaticIndexSizeKB() %>KB</td>
<td><% sl.getTotalStaticBloomSizeKB() %>KB</td>
<td><% sl.getStoreUncompressedSizeMB() %>m</td>
<td><% sl.getStorefileSizeInMB() %>mb</td>
<td><% sl.getTotalStaticIndexSizeKB() %>k</td>
<td><% sl.getTotalStaticBloomSizeKB() %>k</td>
</tr>
<%java>
} else {

View File

@ -152,10 +152,10 @@
<%if load != null %>
<td><% load.getStores() %></td>
<td><% load.getStorefiles() %></td>
<td><% load.getStoreUncompressedSizeMB() %>MB</td>
<td><% load.getStorefileSizeMB() %>MB</td>
<td><% load.getTotalStaticIndexSizeKB() %>KB</td>
<td><% load.getTotalStaticBloomSizeKB() %>KB</td>
<td><% load.getStoreUncompressedSizeMB() %>m</td>
<td><% load.getStorefileSizeMB() %>m</td>
<td><% load.getTotalStaticIndexSizeKB() %>k</td>
<td><% load.getTotalStaticBloomSizeKB() %>k</td>
</%if>
</tr>
</%for>
@ -215,7 +215,7 @@
</%java>
<td><% r.getRegionNameAsString() %></td>
<%if load != null %>
<td><% load.getMemstoreSizeMB() %>MB</td>
<td><% load.getMemstoreSizeMB() %>m</td>
</%if>
</tr>
</%for>

View File

@ -31,6 +31,7 @@ org.apache.hadoop.hbase.protobuf.ProtobufUtil;
org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo;
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.RegionLoad;
org.apache.hadoop.hbase.metrics.histogram.MetricsHistogram;
org.apache.hadoop.util.StringUtils;
com.yammer.metrics.stats.Snapshot;
java.lang.management.ManagementFactory;
</%import>
@ -100,12 +101,12 @@ MetricsRegionServerWrapper mWrap;
</tr>
<tr>
<td>
<% ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed() %>
<% StringUtils.humanReadableInt(ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed()) %>
</td>
<td>
<% ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax()%>
<% StringUtils.humanReadableInt(ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax()) %>
</td>
<td><% mWrap.getMemstoreSize() %></td>
<td><% StringUtils.humanReadableInt(mWrap.getMemstoreSize()) %></td>
</tr>
</table>
</%def>
@ -147,7 +148,7 @@ MetricsRegionServerWrapper mWrap;
<tr>
<td><% mWrap.getRequestsPerSecond() %></td>
<td><% mWrap.getReadRequestsCount() %></td>
<td><% mWrap.getWriteRequestsCount() %>KB</td>
<td><% mWrap.getWriteRequestsCount() %></td>
</tr>
</table>
</%def>
@ -195,4 +196,4 @@ MetricsRegionServerWrapper mWrap;
<td><% mWrap.getBlockCacheEvictedCount() %></td>
</tr>
</table>
</%def>
</%def>