Skip to content

Commit

Permalink
HBASE-23590 : Update maxCompactedStoreFileRef (ADDENDUM)
Browse files Browse the repository at this point in the history
  • Loading branch information
virajjasani committed Jan 2, 2020
1 parent e0c419d commit 19b35d2
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2878,12 +2878,15 @@ public int getStoreRefCount() {
*/
public int getMaxCompactedStoreFileRefCount() {
int maxCompactedStoreFileRefCount = 0;
for (StoreFile store : storeEngine.getStoreFileManager().getCompactedfiles()) {
if (store.isHFile()) {
StoreFile.Reader storeReader = store.getReader();
if (storeReader != null) {
maxCompactedStoreFileRefCount = Math.max(maxCompactedStoreFileRefCount,
storeReader.getRefCount());
Collection<StoreFile> compactedFiles = storeEngine.getStoreFileManager().getCompactedfiles();
if (compactedFiles != null) {
for (StoreFile store : compactedFiles) {
if (store.isHFile()) {
StoreFile.Reader storeReader = store.getReader();
if (storeReader != null) {
maxCompactedStoreFileRefCount = Math.max(maxCompactedStoreFileRefCount,
storeReader.getRefCount());
}
}
}
}
Expand Down

0 comments on commit 19b35d2

Please sign in to comment.