Skip to content
Permalink
Browse files
HBASE-27021 StoreFileInfo should set its initialPath in a consistent way
(Amending spotless errors after revert by Duo)
  • Loading branch information
wchevreuil committed May 12, 2022
1 parent 141b827 commit 3fbf66729dc6434f3a931f30e0330b99b0b6b719
Showing 2 changed files with 10 additions and 7 deletions.
@@ -130,7 +130,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);
@@ -940,13 +940,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

0 comments on commit 3fbf667

Please sign in to comment.