2005hithlj commented on code in PR #4891: URL: https://github.com/apache/hbase/pull/4891#discussion_r1055424594
########## hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java: ########## @@ -1780,6 +1781,29 @@ public OptionalDouble getAvgStoreFileAge() { return getStoreFileAgeStream().average(); } + @Override + public Map<String, Pair<Long, Long>> getStoreFilesAccessTimeAndSize() { + Collection<HStoreFile> storeFiles = this.storeEngine.getStoreFileManager().getStorefiles(); + Map<String, Pair<Long, Long>> sfAccessTimeAndSizeMap = new HashMap<>(); + for (HStoreFile sf : storeFiles) { + if (sf.getReader() == null) { + continue; + } + FileStatus fileStatus; + try { + fileStatus = sf.getFileInfo().getFileStatus(); Review Comment: > If this FileStatus is cached, then the accessTime will not be updated? @Apache9 sir. Thanks for your review. Yes, if FileStatus is cached, the accessTime will not be updated, but the current logic is got from the back-end file system in real time. -- 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