Skip to content

Commit

Permalink
HBASE-27021 StoreFileInfo should set its initialPath in a consistent way
Browse files Browse the repository at this point in the history
(Amending spotless errors after revert by Duo)
  • Loading branch information
wchevreuil committed May 12, 2022
1 parent e3359ef commit 930bc53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private StoreFileInfo(final Configuration conf, final FileSystem fs, final FileS

this.fs = fs;
this.conf = conf;
this.initialPath = initialPath;
this.initialPath = fs.makeQualified(initialPath);
this.primaryReplica = primaryReplica;
this.noReadahead =
this.conf.getBoolean(STORE_FILE_READER_NO_READAHEAD, DEFAULT_STORE_FILE_READER_NO_READAHEAD);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -941,13 +941,16 @@ private void archiveStoreFile(int index) throws IOException {
private void closeCompactedFile(int index) throws IOException {
Collection<HStoreFile> files =
this.store.getStoreEngine().getStoreFileManager().getCompactedfiles();
HStoreFile sf = null;
Iterator<HStoreFile> it = files.iterator();
for (int i = 0; i <= index; i++) {
sf = it.next();
if (files.size() > 0) {
HStoreFile sf = null;
Iterator<HStoreFile> it = files.iterator();
for (int i = 0; i <= index; i++) {
sf = it.next();
}
sf.closeStoreFile(true);
store.getStoreEngine().getStoreFileManager()
.removeCompactedFiles(Collections.singletonList(sf));
}
sf.closeStoreFile(true);
store.getStoreEngine().getStoreFileManager().removeCompactedFiles(Lists.newArrayList(sf));
}

@Test
Expand Down

0 comments on commit 930bc53

Please sign in to comment.