virajjasani commented on a change in pull request #600: HBASE-22460 : Reopen
regions with very high Store Ref Counts
URL: https://github.com/apache/hbase/pull/600#discussion_r327725101
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
##########
@@ -2774,4 +2774,22 @@ public int getStoreRefCount() {
.filter(sf -> sf.getReader() != null).filter(HStoreFile::isHFile)
.mapToInt(HStoreFile::getRefCount).sum();
}
+
+ /**
+ * @return get maximum ref count of storeFile among all HStore Files
+ * for the HStore
+ */
+ public int getMaxStoreFileRefCount() {
+ int maxStoreFileRefCount = 0;
+ Collection<HStoreFile> hStoreFiles = this.storeEngine.getStoreFileManager()
+ .getStorefiles();
+ for (HStoreFile storeFile : hStoreFiles) {
Review comment:
Yes same thing but with streams, so better
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services