HBASE-27021 StoreFileInfo should set its initialPath in a consistent way
(Amending spotless errors after revert by Duo)
This commit is contained in:
parent
141b827f47
commit
3fbf66729d
|
@ -130,7 +130,7 @@ public class StoreFileInfo implements Configurable {
|
||||||
|
|
||||||
this.fs = fs;
|
this.fs = fs;
|
||||||
this.conf = conf;
|
this.conf = conf;
|
||||||
this.initialPath = initialPath;
|
this.initialPath = fs.makeQualified(initialPath);
|
||||||
this.primaryReplica = primaryReplica;
|
this.primaryReplica = primaryReplica;
|
||||||
this.noReadahead =
|
this.noReadahead =
|
||||||
this.conf.getBoolean(STORE_FILE_READER_NO_READAHEAD, DEFAULT_STORE_FILE_READER_NO_READAHEAD);
|
this.conf.getBoolean(STORE_FILE_READER_NO_READAHEAD, DEFAULT_STORE_FILE_READER_NO_READAHEAD);
|
||||||
|
|
|
@ -940,13 +940,16 @@ public class TestHStore {
|
||||||
private void closeCompactedFile(int index) throws IOException {
|
private void closeCompactedFile(int index) throws IOException {
|
||||||
Collection<HStoreFile> files =
|
Collection<HStoreFile> files =
|
||||||
this.store.getStoreEngine().getStoreFileManager().getCompactedfiles();
|
this.store.getStoreEngine().getStoreFileManager().getCompactedfiles();
|
||||||
HStoreFile sf = null;
|
if (files.size() > 0) {
|
||||||
Iterator<HStoreFile> it = files.iterator();
|
HStoreFile sf = null;
|
||||||
for (int i = 0; i <= index; i++) {
|
Iterator<HStoreFile> it = files.iterator();
|
||||||
sf = it.next();
|
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
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue