HBASE-17366 Run TestHFile#testReaderWithoutBlockCache failes

Signed-off-by: CHIA-PING TSAI <chia7712@gmail.com>
This commit is contained in:
huaxiang sun 2017-04-17 10:32:17 +08:00 committed by CHIA-PING TSAI
parent 363f62751c
commit c1ac3f7739
2 changed files with 10 additions and 1 deletions

View File

@ -383,6 +383,15 @@ public class StoreFileWriter implements CellSink, ShipperListener {
this.fs = fs;
}
/**
* Creates Builder with cache configuration disabled
*/
public Builder(Configuration conf, FileSystem fs) {
this.conf = conf;
this.cacheConf = CacheConfig.DISABLED;
this.fs = fs;
}
/**
* @param trt A premade TimeRangeTracker to use rather than build one per append (building one
* of these is expensive so good to pass one in if you have one).

View File

@ -115,7 +115,7 @@ public class TestHFile {
Path storeFileParentDir = new Path(TEST_UTIL.getDataTestDir(), "TestHFile");
HFileContext meta = new HFileContextBuilder().withBlockSize(64 * 1024).build();
StoreFileWriter sfw =
new StoreFileWriter.Builder(conf, cacheConf, fs).withOutputDir(storeFileParentDir)
new StoreFileWriter.Builder(conf, fs).withOutputDir(storeFileParentDir)
.withComparator(CellComparator.COMPARATOR).withFileContext(meta).build();
final int rowLen = 32;