HBASE-29145 Table Stats shows store file size as zero always for hbae:meta table (#6716)

Signed-off-by: Pankaj Kumar <pankajkumar@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
diff --git a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
index 82cfd41..d88d968 100644
--- a/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
+++ b/hbase-server/src/main/resources/hbase-webapps/master/table.jsp
@@ -377,7 +377,11 @@
                         writeReq = String.format("%,1d", load.getWriteRequestCount());
                         double rSize = load.getStoreFileSize().get(Size.Unit.BYTE);
                         if (rSize > 0) {
-                        fileSize = StringUtils.byteDesc((long) rSize);
+                          fileSize = StringUtils.byteDesc((long) rSize);
+                           // use the primary replica only for the total store file size calculation
+                           if (j == 0) {
+                             totalStoreFileSizeMB += load.getStoreFileSize().get(Size.Unit.MEGABYTE);
+                           }
                         }
                         double rSizeUncompressed = load.getUncompressedStoreFileSize().get(Size.Unit.BYTE);
                         if (rSizeUncompressed > 0) {