File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -2878,12 +2878,15 @@ public int getStoreRefCount() {
2878
2878
*/
2879
2879
public int getMaxCompactedStoreFileRefCount () {
2880
2880
int maxCompactedStoreFileRefCount = 0 ;
2881
- for (StoreFile store : storeEngine .getStoreFileManager ().getCompactedfiles ()) {
2882
- if (store .isHFile ()) {
2883
- StoreFile .Reader storeReader = store .getReader ();
2884
- if (storeReader != null ) {
2885
- maxCompactedStoreFileRefCount = Math .max (maxCompactedStoreFileRefCount ,
2886
- storeReader .getRefCount ());
2881
+ Collection <StoreFile > compactedFiles = storeEngine .getStoreFileManager ().getCompactedfiles ();
2882
+ if (compactedFiles != null ) {
2883
+ for (StoreFile store : compactedFiles ) {
2884
+ if (store .isHFile ()) {
2885
+ StoreFile .Reader storeReader = store .getReader ();
2886
+ if (storeReader != null ) {
2887
+ maxCompactedStoreFileRefCount = Math .max (maxCompactedStoreFileRefCount ,
2888
+ storeReader .getRefCount ());
2889
+ }
2887
2890
}
2888
2891
}
2889
2892
}
You can’t perform that action at this time.
0 commit comments