HBASE-24381 The Size metrics in Master Webui is wrong if the size is 0 (#1723)
This commit is contained in:
parent
cc1f2a6087
commit
c42a57970c
|
@ -171,10 +171,10 @@ if (master.getServerManager() != null) {
|
|||
</tr>
|
||||
<%java>
|
||||
final String ZEROMB = "0 MB";
|
||||
for (RSGroupInfo rsGroupInfo: rsGroupInfos) {
|
||||
String usedHeapStr = ZEROMB;
|
||||
String maxHeapStr = ZEROMB;
|
||||
String memstoreSizeStr = ZEROMB;
|
||||
for (RSGroupInfo rsGroupInfo: rsGroupInfos) {
|
||||
String rsGroupName = rsGroupInfo.getName();
|
||||
long usedHeap = 0;
|
||||
long maxHeap = 0;
|
||||
|
@ -275,11 +275,11 @@ if (master.getServerManager() != null) {
|
|||
<%java>
|
||||
final String ZEROKB = "0 KB";
|
||||
final String ZEROMB = "0 MB";
|
||||
for (RSGroupInfo rsGroupInfo: rsGroupInfos) {
|
||||
String uncompressedStorefileSizeStr = ZEROMB;
|
||||
String storefileSizeStr = ZEROMB;
|
||||
String indexSizeStr = ZEROKB;
|
||||
String bloomSizeStr = ZEROKB;
|
||||
for (RSGroupInfo rsGroupInfo: rsGroupInfos) {
|
||||
String rsGroupName = rsGroupInfo.getName();
|
||||
int numStores = 0;
|
||||
long numStorefiles = 0;
|
||||
|
|
|
@ -162,10 +162,10 @@ Arrays.sort(serverNames);
|
|||
<tbody>
|
||||
<%java>
|
||||
final String ZEROMB = "0 MB";
|
||||
String usedHeapStr = ZEROMB;
|
||||
String maxHeapStr = ZEROMB;
|
||||
String memStoreSizeMBStr = ZEROMB;
|
||||
for (ServerName serverName: serverNames) {
|
||||
String usedHeapStr = ZEROMB;
|
||||
String maxHeapStr = ZEROMB;
|
||||
String memStoreSizeMBStr = ZEROMB;
|
||||
ServerMetrics sl = master.getServerManager().getLoad(serverName);
|
||||
if (sl != null) {
|
||||
long memStoreSizeMB = 0;
|
||||
|
@ -276,14 +276,14 @@ if (sl != null) {
|
|||
<%java>
|
||||
final String ZEROKB = "0 KB";
|
||||
final String ZEROMB = "0 MB";
|
||||
String storeUncompressedSizeMBStr = ZEROMB;
|
||||
String storeFileSizeMBStr = ZEROMB;
|
||||
String totalStaticIndexSizeKBStr = ZEROKB;
|
||||
String totalStaticBloomSizeKBStr = ZEROKB;
|
||||
for (ServerName serverName: serverNames) {
|
||||
|
||||
ServerMetrics sl = master.getServerManager().getLoad(serverName);
|
||||
if (sl != null) {
|
||||
String storeUncompressedSizeMBStr = ZEROMB;
|
||||
String storeFileSizeMBStr = ZEROMB;
|
||||
String totalStaticIndexSizeKBStr = ZEROKB;
|
||||
String totalStaticBloomSizeKBStr = ZEROKB;
|
||||
ServerMetrics sl = master.getServerManager().getLoad(serverName);
|
||||
if (sl != null) {
|
||||
long storeCount = 0;
|
||||
long storeFileCount = 0;
|
||||
long storeUncompressedSizeMB = 0;
|
||||
|
@ -326,7 +326,7 @@ if (sl != null) {
|
|||
</tr>
|
||||
<%java>
|
||||
} else {
|
||||
</%java>
|
||||
</%java>
|
||||
<& emptyStat; serverName=serverName; &>
|
||||
<%java>
|
||||
}
|
||||
|
|
|
@ -213,11 +213,10 @@
|
|||
<th>Memstore Size</th>
|
||||
</tr>
|
||||
<%
|
||||
for (Address server: rsGroupServers) {
|
||||
String usedHeapSizeMBStr = ZEROMB;
|
||||
String maxHeapSizeMBStr = ZEROMB;
|
||||
String memStoreSizeMBStr = ZEROMB;
|
||||
|
||||
for (Address server: rsGroupServers) {
|
||||
ServerName serverName = serverMaping.get(server);
|
||||
ServerMetrics sl = onlineServers.get(server);
|
||||
if (sl != null && serverName != null) {
|
||||
|
@ -309,11 +308,11 @@
|
|||
<th>Bloom Size</th>
|
||||
</tr>
|
||||
<%
|
||||
for (Address server: rsGroupServers) {
|
||||
String storeUncompressedSizeMBStr = ZEROMB;
|
||||
String storeFileSizeMBStr = ZEROMB;
|
||||
String totalStaticIndexSizeKBStr = ZEROKB;
|
||||
String totalStaticBloomSizeKBStr = ZEROKB;
|
||||
for (Address server: rsGroupServers) {
|
||||
ServerName serverName = serverMaping.get(server);
|
||||
ServerMetrics sl = onlineServers.get(server);
|
||||
if (sl != null && serverName != null) {
|
||||
|
|
Loading…
Reference in New Issue