Apache9 commented on code in PR #4891:
URL: https://github.com/apache/hbase/pull/4891#discussion_r1056735714
##########
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:
Will this introduce a request spike to NN? Usually after opening a store
file we will not goto NN any more...
I wonder if we can maintain this information inside HBase?
--
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]