Fix failing Java unit test.

Test Plan: sent diff to sdong, passes :)

Reviewers: sdong

Reviewed By: sdong

Subscribers: leveldb, andrewkr, dhruba

Differential Revision: https://reviews.facebook.net/D55749
This commit is contained in:
Marton Trencseni 2016-03-19 15:53:56 +00:00
parent fbbb8a6144
commit d7ae42b0f8

View File

@ -21,6 +21,7 @@ public class BlockBasedTableConfig extends TableFormatConfig {
wholeKeyFiltering_ = true; wholeKeyFiltering_ = true;
filter_ = null; filter_ = null;
cacheIndexAndFilterBlocks_ = false; cacheIndexAndFilterBlocks_ = false;
pinL0FilterAndIndexBlocksInCache_ = false;
hashIndexAllowCollision_ = true; hashIndexAllowCollision_ = true;
blockCacheCompressedSize_ = 0; blockCacheCompressedSize_ = 0;
blockCacheCompressedNumShardBits_ = 0; blockCacheCompressedNumShardBits_ = 0;
@ -226,6 +227,29 @@ public class BlockBasedTableConfig extends TableFormatConfig {
return this; return this;
} }
/**
* Indicating if we'd like to pin L0 index/filter blocks to the block cache.
If not specified, defaults to false.
*
* @return if L0 index and filter blocks should be pinned to the block cache.
*/
public boolean pinL0FilterAndIndexBlocksInCache() {
return pinL0FilterAndIndexBlocksInCache_;
}
/**
* Indicating if we'd like to pin L0 index/filter blocks to the block cache.
If not specified, defaults to false.
*
* @param pinL0FilterAndIndexBlocksInCache pin blocks in block cache
* @return the reference to the current config.
*/
public BlockBasedTableConfig setPinL0FilterAndIndexBlocksInCache(
final boolean pinL0FilterAndIndexBlocksInCache) {
pinL0FilterAndIndexBlocksInCache_ = pinL0FilterAndIndexBlocksInCache;
return this;
}
/** /**
* Influence the behavior when kHashSearch is used. * Influence the behavior when kHashSearch is used.
if false, stores a precise prefix to block range mapping if false, stores a precise prefix to block range mapping
@ -393,6 +417,7 @@ public class BlockBasedTableConfig extends TableFormatConfig {
blockCacheNumShardBits_, blockSize_, blockSizeDeviation_, blockCacheNumShardBits_, blockSize_, blockSizeDeviation_,
blockRestartInterval_, wholeKeyFiltering_, blockRestartInterval_, wholeKeyFiltering_,
filterHandle, cacheIndexAndFilterBlocks_, filterHandle, cacheIndexAndFilterBlocks_,
pinL0FilterAndIndexBlocksInCache_,
hashIndexAllowCollision_, blockCacheCompressedSize_, hashIndexAllowCollision_, blockCacheCompressedSize_,
blockCacheCompressedNumShardBits_, blockCacheCompressedNumShardBits_,
checksumType_.getValue(), indexType_.getValue(), checksumType_.getValue(), indexType_.getValue(),
@ -403,11 +428,13 @@ public class BlockBasedTableConfig extends TableFormatConfig {
boolean noBlockCache, long blockCacheSize, int blockCacheNumShardBits, boolean noBlockCache, long blockCacheSize, int blockCacheNumShardBits,
long blockSize, int blockSizeDeviation, int blockRestartInterval, long blockSize, int blockSizeDeviation, int blockRestartInterval,
boolean wholeKeyFiltering, long filterPolicyHandle, boolean wholeKeyFiltering, long filterPolicyHandle,
boolean cacheIndexAndFilterBlocks, boolean hashIndexAllowCollision, boolean cacheIndexAndFilterBlocks, boolean pinL0FilterAndIndexBlocksInCache,
long blockCacheCompressedSize, int blockCacheCompressedNumShardBits, boolean hashIndexAllowCollision, long blockCacheCompressedSize,
byte checkSumType, byte indexType, int formatVersion); int blockCacheCompressedNumShardBits, byte checkSumType,
byte indexType, int formatVersion);
private boolean cacheIndexAndFilterBlocks_; private boolean cacheIndexAndFilterBlocks_;
private boolean pinL0FilterAndIndexBlocksInCache_;
private IndexType indexType_; private IndexType indexType_;
private boolean hashIndexAllowCollision_; private boolean hashIndexAllowCollision_;
private ChecksumType checksumType_; private ChecksumType checksumType_;