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>
This commit is contained in:
Wellington Ramos Chevreuil 2022-05-12 09:36:46 +01:00 committed by GitHub
parent a712f9fa34
commit aa31b0f695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View File

@ -130,7 +130,7 @@ public class StoreFileInfo implements Configurable {
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);

View File

@ -940,13 +940,16 @@ public class TestHStore {
private void closeCompactedFile(int index) throws IOException {
Collection<HStoreFile> files =
this.store.getStoreEngine().getStoreFileManager().getCompactedfiles();
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(Lists.newArrayList(sf));
store.getStoreEngine().getStoreFileManager().
removeCompactedFiles(Collections.singletonList(sf));
}
}
@Test