You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/11/24 15:27:31 UTC

[GitHub] [hbase] Apache9 commented on a change in pull request #3872: HBASE-26340 - fix RegionSizeCalculator getLEngth to bytes instead of …

Apache9 commented on a change in pull request #3872:
URL: https://github.com/apache/hbase/pull/3872#discussion_r756184864



##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
##########
@@ -1460,6 +1466,10 @@ RegionLoad createRegionLoad(final HRegion r, RegionLoad.Builder regionLoadBldr,
       totalStaticIndexSizeKB += (int) (store.getTotalStaticIndexSize() / 1024);
       totalStaticBloomSizeKB += (int) (store.getTotalStaticBloomSize() / 1024);
     }
+    //HBASE-26340 Fix false "0" size under 1MB
+    if(storefileSizeMB < 1 && nonEmptyStoreExist) {

Review comment:
       Do we need to apply this trick to other fields as well? Just introduce a round method
   
   ```
   long round(long size, long unit) {
     // normally return size / unit, if size is smaller than unit but greater than 0, return 1
   }
   ```
   
   And all the size should be calculated by this method




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org