Skip to content
Permalink
Browse files
HBASE-27021 StoreFileInfo should set its initialPath in a consistent …
…way (#4419)

Signed-off-by: Josh Elser <elserj@apache.org>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
  • Loading branch information
wchevreuil committed May 12, 2022
1 parent a712f9f commit aa31b0f695ab02015a7a183aaf10ac9963a22ddb
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 aa31b0f

Please sign in to comment.