Skip to content

Commit

Permalink
fix violations
Browse files Browse the repository at this point in the history
  • Loading branch information
terence-yoo committed Dec 29, 2022
1 parent 96b7fe3 commit 9c22e81
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,6 @@ public HDFSBlocksDistribution getHDFSBlockDistribution() {
* Opens reader on this store file. Called by Constructor.
* @see #closeStoreFile(boolean)
*/
private void open() throws IOException {
open(false);
}

private void open(boolean warmup) throws IOException {
fileInfo.initHDFSBlocksDistribution();
long readahead = fileInfo.isNoReadahead() ? 0L : -1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ public HStoreFile createStoreFileAndReader(StoreFileInfo info) throws IOExceptio
return createStoreFileAndReader(info, false);
}

public HStoreFile createStoreFileAndReader(StoreFileInfo info, boolean warmup) throws IOException {
public HStoreFile createStoreFileAndReader(StoreFileInfo info, boolean warmup)
throws IOException {
info.setRegionCoprocessorHost(coprocessorHost);
HStoreFile storeFile = new HStoreFile(info, ctx.getFamily().getBloomFilterType(),
ctx.getCacheConf(), bloomFilterMetrics);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,8 @@ public void testInitReaderForWarmup() throws Exception {
Path hsfPath = regionFs.commitStoreFile(TEST_FAMILY, writer.getPath());
writer.close();

HStoreFile file = Mockito.spy(new HStoreFile(this.fs, hsfPath, conf, cacheConf, BloomType.NONE, true));
HStoreFile file =
Mockito.spy(new HStoreFile(this.fs, hsfPath, conf, cacheConf, BloomType.NONE, true));

// after warmup the file reader should be closed and null to avoid file descriptor leakage
file.initReader(true);
Expand Down

0 comments on commit 9c22e81

Please sign in to comment.