nkalmar commented on a change in pull request #3872:
URL: https://github.com/apache/hbase/pull/3872#discussion_r763137737
##########
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:
storefileSizeMB is integer, it is either 0 or 1 here (well, or any other
positive integer, but staying at the less then 1MB example), and we go through
all the storelist above, if we do the rounding there, we keep adding 1MB every
time there is like 10KB of data, that would result in a false size as well. We
need "nonEmptyStoreExist" to tell us if there were storefile anywhere, or else
we'll just see 0 here and cant round up to 1 bc it was either really empty or
size didn't reach the 1MB
##########
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:
I could use a new variable "long storefileSizeMBTemp" and create a
function "int round(long size, int unit)" but it just seems kind of a special
case to create a function for it.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]