Apache9 commented on code in PR #4891: URL: https://github.com/apache/hbase/pull/4891#discussion_r1193961037
########## hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsTableWrapperAggregateImpl.java: ########## @@ -115,10 +134,23 @@ public void run() { // accumulate the count mt.perStoreMemstoreOnlyReadCount.put(tempKey, memstoreReadCount); mt.perStoreMixedReadCount.put(tempKey, mixedReadCount); + Map<String, Pair<Long, Long>> sfAccessTimeAndSizeMap = + store.getStoreFilesAccessTimeAndSize(); + Long now = EnvironmentEdgeManager.currentTime(); + for (Pair<Long, Long> pair : sfAccessTimeAndSizeMap.values()) { + Long accessTime = pair.getFirst(); + Long size = pair.getSecond(); + for (int threshold : storeFilesAccessedDaysThresholds) { + Long sumSize = mt.storeFilesAccessedDaysAndSize.get(threshold); + if ((now - accessTime) >= threshold * ONE_DAY_MS) { Review Comment: So here if the accessTime is very old, we will increase the sumSize for all the thresholds? Is this by design? Seems a bit strange... ########## hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/MetricsTableWrapperAggregateImpl.java: ########## @@ -115,10 +134,23 @@ public void run() { // accumulate the count mt.perStoreMemstoreOnlyReadCount.put(tempKey, memstoreReadCount); mt.perStoreMixedReadCount.put(tempKey, mixedReadCount); + Map<String, Pair<Long, Long>> sfAccessTimeAndSizeMap = + store.getStoreFilesAccessTimeAndSize(); + Long now = EnvironmentEdgeManager.currentTime(); Review Comment: Just use long instead of Long? -- 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-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org