Skip to content

Commit e3a0174

Browse files
authored
HBASE-28305 Add "Uncompressed StoreFileSize" column to the table.jsp (apache#5620)
Co-authored-by: Haosen Chen <[email protected]> Signed-off-by: Duo Zhang <[email protected]>
1 parent 4d2b8f8 commit e3a0174

File tree

1 file changed

+20
-0
lines changed
  • hbase-server/src/main/resources/hbase-webapps/master

1 file changed

+20
-0
lines changed

hbase-server/src/main/resources/hbase-webapps/master/table.jsp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@
315315
<th>Region Server</th>
316316
<th>ReadRequests</th>
317317
<th>WriteRequests</th>
318+
<th>Uncompressed StoreFileSize</th>
318319
<th>StorefileSize</th>
319320
<th>Num.Storefiles</th>
320321
<th>MemSize</th>
@@ -338,6 +339,7 @@
338339
String hostAndPort = "";
339340
String readReq = "N/A";
340341
String writeReq = "N/A";
342+
String fileSizeUncompressed = ZEROMB;
341343
String fileSize = ZEROMB;
342344
String fileCount = "N/A";
343345
String memSize = ZEROMB;
@@ -356,6 +358,10 @@
356358
if (rSize > 0) {
357359
fileSize = StringUtils.byteDesc((long) rSize);
358360
}
361+
double rSizeUncompressed = load.getUncompressedStoreFileSize().get(Size.Unit.BYTE);
362+
if (rSizeUncompressed > 0) {
363+
fileSizeUncompressed = StringUtils.byteDesc((long) rSizeUncompressed);
364+
}
359365
fileCount = String.format("%,1d", load.getStoreFileCount());
360366
double mSize = load.getMemStoreSize().get(Size.Unit.BYTE);
361367
if (mSize > 0) {
@@ -370,6 +376,7 @@
370376
<td><a href="http://<%= hostAndPort %>/rs-status"><%= StringEscapeUtils.escapeHtml4(hostAndPort) %></a></td>
371377
<td><%= readReq%></td>
372378
<td><%= writeReq%></td>
379+
<td><%= fileSizeUncompressed%></td>
373380
<td><%= fileSize%></td>
374381
<td><%= fileCount%></td>
375382
<td><%= memSize%></td>
@@ -834,6 +841,7 @@
834841
<%
835842
long totalReadReq = 0;
836843
long totalWriteReq = 0;
844+
long totalSizeUncompressed = 0;
837845
long totalSize = 0;
838846
long totalStoreFileCount = 0;
839847
long totalMemSize = 0;
@@ -844,6 +852,7 @@
844852
long totalBlocksLocalWithSsdWeight = 0;
845853
String totalCompactionProgress = "";
846854
String totalMemSizeStr = ZEROMB;
855+
String totalSizeUncompressedStr = ZEROMB;
847856
String totalSizeStr = ZEROMB;
848857
String totalLocality = "";
849858
String totalLocalityForSsd = "";
@@ -865,6 +874,7 @@
865874
if (regionMetrics != null) {
866875
totalReadReq += regionMetrics.getReadRequestCount();
867876
totalWriteReq += regionMetrics.getWriteRequestCount();
877+
totalSizeUncompressed += regionMetrics.getUncompressedStoreFileSize().get(Size.Unit.MEGABYTE);
868878
totalSize += regionMetrics.getStoreFileSize().get(Size.Unit.MEGABYTE);
869879
totalStoreFileCount += regionMetrics.getStoreFileCount();
870880
totalMemSize += regionMetrics.getMemStoreSize().get(Size.Unit.MEGABYTE);
@@ -890,6 +900,9 @@
890900
if (totalSize > 0) {
891901
totalSizeStr = StringUtils.byteDesc(totalSize*1024l*1024);
892902
}
903+
if (totalSizeUncompressed > 0){
904+
totalSizeUncompressedStr = StringUtils.byteDesc(totalSizeUncompressed*1024l*1024);
905+
}
893906
if (totalMemSize > 0) {
894907
totalMemSizeStr = StringUtils.byteDesc(totalMemSize*1024l*1024);
895908
}
@@ -920,6 +933,7 @@
920933
<th>Region Server</th>
921934
<th>ReadRequests<br>(<%= String.format("%,1d", totalReadReq)%>)</th>
922935
<th>WriteRequests<br>(<%= String.format("%,1d", totalWriteReq)%>)</th>
936+
<th>Uncompressed StoreFileSize<br>(<%= totalSizeUncompressedStr %>)</th>
923937
<th>StorefileSize<br>(<%= totalSizeStr %>)</th>
924938
<th>Num.Storefiles<br>(<%= String.format("%,1d", totalStoreFileCount)%>)</th>
925939
<th>MemSize<br>(<%= totalMemSizeStr %>)</th>
@@ -944,13 +958,18 @@
944958
RegionMetrics load = hriEntry.getValue();
945959
String readReq = "N/A";
946960
String writeReq = "N/A";
961+
String regionSizeUncompressed = ZEROMB;
947962
String regionSize = ZEROMB;
948963
String fileCount = "N/A";
949964
String memSize = ZEROMB;
950965
String state = "N/A";
951966
if (load != null) {
952967
readReq = String.format("%,1d", load.getReadRequestCount());
953968
writeReq = String.format("%,1d", load.getWriteRequestCount());
969+
double rSizeUncompressed = load.getUncompressedStoreFileSize().get(Size.Unit.BYTE);
970+
if (rSizeUncompressed > 0) {
971+
regionSizeUncompressed = StringUtils.byteDesc((long)rSizeUncompressed);
972+
}
954973
double rSize = load.getStoreFileSize().get(Size.Unit.BYTE);
955974
if (rSize > 0) {
956975
regionSize = StringUtils.byteDesc((long)rSize);
@@ -987,6 +1006,7 @@
9871006
<%= buildRegionDeployedServerTag(regionInfo, master, regionsToServer) %>
9881007
<td><%= readReq%></td>
9891008
<td><%= writeReq%></td>
1009+
<td><%= regionSizeUncompressed%></td>
9901010
<td><%= regionSize%></td>
9911011
<td><%= fileCount%></td>
9921012
<td><%= memSize%></td>

0 commit comments

Comments
 (0)