public class BlockBasedTableConfig extends TableFormatConfig
| Constructor and Description |
|---|
BlockBasedTableConfig() |
| Modifier and Type | Method and Description |
|---|---|
int |
blockCacheCompressedNumShardBits()
Controls the number of shards for the block compressed cache.
|
long |
blockCacheCompressedSize()
Size of compressed block cache.
|
long |
blockCacheSize() |
int |
blockRestartInterval() |
long |
blockSize() |
int |
blockSizeDeviation() |
boolean |
cacheIndexAndFilterBlocks()
Indicating if we'd put index/filter blocks to the block cache.
|
boolean |
cacheIndexAndFilterBlocksWithHighPriority()
Indicates if index and filter blocks will be treated as high-priority in the block cache.
|
int |
cacheNumShardBits()
Returns the number of shard bits used in the block cache.
|
ChecksumType |
checksumType() |
int |
formatVersion() |
boolean |
hashIndexAllowCollision()
Influence the behavior when kHashSearch is used.
|
IndexType |
indexType() |
long |
metadataBlockSize() |
protected long |
newTableFactoryHandle()
This function should only be called by Options.setTableFormatConfig(),
which will create a c++ shared-pointer to the c++ TableFactory
that associated with the Java TableFormatConfig.
|
boolean |
noBlockCache() |
boolean |
partitionFilters()
Indicating if we're using partitioned filters.
|
boolean |
pinL0FilterAndIndexBlocksInCache()
Indicating if we'd like to pin L0 index/filter blocks to the block cache.
|
boolean |
pinTopLevelIndexAndFilter()
Indicates if top-level index and filter blocks should be pinned.
|
BlockBasedTableConfig |
setBlockCache(Cache cache)
Use the specified cache for blocks.
|
BlockBasedTableConfig |
setBlockCacheCompressedNumShardBits(int blockCacheCompressedNumShardBits)
Controls the number of shards for the block compressed cache.
|
BlockBasedTableConfig |
setBlockCacheCompressedSize(long blockCacheCompressedSize)
Size of compressed block cache.
|
BlockBasedTableConfig |
setBlockCacheSize(long blockCacheSize)
Set the amount of cache in bytes that will be used by RocksDB.
|
BlockBasedTableConfig |
setBlockRestartInterval(int restartInterval)
Set block restart interval
|
BlockBasedTableConfig |
setBlockSize(long blockSize)
Approximate size of user data packed per block.
|
BlockBasedTableConfig |
setBlockSizeDeviation(int blockSizeDeviation)
This is used to close a block before it reaches the configured
'block_size'.
|
BlockBasedTableConfig |
setCacheIndexAndFilterBlocks(boolean cacheIndexAndFilterBlocks)
Indicating if we'd put index/filter blocks to the block cache.
|
BlockBasedTableConfig |
setCacheIndexAndFilterBlocksWithHighPriority(boolean cacheIndexAndFilterBlocksWithHighPriority)
If true, cache index and filter blocks with high priority.
|
BlockBasedTableConfig |
setCacheNumShardBits(int blockCacheNumShardBits)
Controls the number of shards for the block cache.
|
BlockBasedTableConfig |
setChecksumType(ChecksumType checksumType)
Sets the checksum type to be used with this table.
|
BlockBasedTableConfig |
setFilter(Filter filter)
Use the specified filter policy to reduce disk reads.
|
BlockBasedTableConfig |
setFormatVersion(int formatVersion)
We currently have three versions:
|
BlockBasedTableConfig |
setHashIndexAllowCollision(boolean hashIndexAllowCollision)
Influence the behavior when kHashSearch is used.
|
BlockBasedTableConfig |
setIndexType(IndexType indexType)
Sets the index type to used with this table.
|
BlockBasedTableConfig |
setMetadataBlockSize(long metadataBlockSize)
Set block size for partitioned metadata.
|
BlockBasedTableConfig |
setNoBlockCache(boolean noBlockCache)
Disable block cache.
|
BlockBasedTableConfig |
setPartitionFilters(boolean partitionFilters)
Use partitioned full filters for each SST file.
|
BlockBasedTableConfig |
setPinL0FilterAndIndexBlocksInCache(boolean pinL0FilterAndIndexBlocksInCache)
Indicating if we'd like to pin L0 index/filter blocks to the block cache.
|
BlockBasedTableConfig |
setPinTopLevelIndexAndFilter(boolean pinTopLevelIndexAndFilter)
If cacheIndexAndFilterBlocks is true and the below is true, then
the top-level index of partitioned filter and index blocks are stored in
the cache, but a reference is held in the "table reader" object so the
blocks are pinned and only evicted from cache when the table reader is
freed.
|
BlockBasedTableConfig |
setWholeKeyFiltering(boolean wholeKeyFiltering)
If true, place whole keys in the filter (not just prefixes).
|
boolean |
wholeKeyFiltering() |
public BlockBasedTableConfig setNoBlockCache(boolean noBlockCache)
nullptr object.
Default: falsenoBlockCache - if use block cachepublic boolean noBlockCache()
public BlockBasedTableConfig setBlockCacheSize(long blockCacheSize)
blockCacheSize - block cache size in bytespublic long blockCacheSize()
public BlockBasedTableConfig setBlockCache(Cache cache)
Cache should not be disposed before options instances
using this cache is disposed.
Cache instance can be re-used in multiple options
instances.cache - Cache Cache java instance (e.g. LRUCache).public BlockBasedTableConfig setCacheNumShardBits(int blockCacheNumShardBits)
blockCacheNumShardBits - the number of shard bits. The resulting
number of shards would be 2 ^ numShardBits. Any negative
number means use default settings."public int cacheNumShardBits()
public BlockBasedTableConfig setBlockSize(long blockSize)
blockSize - block size in bytespublic long blockSize()
public BlockBasedTableConfig setBlockSizeDeviation(int blockSizeDeviation)
blockSizeDeviation - the deviation to block size allowedpublic int blockSizeDeviation()
public BlockBasedTableConfig setBlockRestartInterval(int restartInterval)
restartInterval - block restart interval.public int blockRestartInterval()
public BlockBasedTableConfig setWholeKeyFiltering(boolean wholeKeyFiltering)
wholeKeyFiltering - if enable whole key filteringpublic boolean wholeKeyFiltering()
public BlockBasedTableConfig setFilter(Filter filter)
Filter should not be disposed before options instances
using this filter is disposed. If AbstractNativeReference.dispose() function is not
called, then filter object will be GC'd automatically.
Filter instance can be re-used in multiple options
instances.filter - Filter Filter Policy java instance.public boolean cacheIndexAndFilterBlocks()
public BlockBasedTableConfig setCacheIndexAndFilterBlocks(boolean cacheIndexAndFilterBlocks)
cacheIndexAndFilterBlocks - and filter blocks should be put in block cache.public boolean cacheIndexAndFilterBlocksWithHighPriority()
public BlockBasedTableConfig setCacheIndexAndFilterBlocksWithHighPriority(boolean cacheIndexAndFilterBlocksWithHighPriority)
cacheIndexAndFilterBlocksWithHighPriority - if index and filter blocks
will be treated as high-priority.public boolean pinL0FilterAndIndexBlocksInCache()
public BlockBasedTableConfig setPinL0FilterAndIndexBlocksInCache(boolean pinL0FilterAndIndexBlocksInCache)
pinL0FilterAndIndexBlocksInCache - pin blocks in block cachepublic boolean partitionFilters()
public BlockBasedTableConfig setPartitionFilters(boolean partitionFilters)
partitionFilters - use partition filters.public long metadataBlockSize()
public BlockBasedTableConfig setMetadataBlockSize(long metadataBlockSize)
metadataBlockSize - Partitioned metadata block size.public boolean pinTopLevelIndexAndFilter()
public BlockBasedTableConfig setPinTopLevelIndexAndFilter(boolean pinTopLevelIndexAndFilter)
pinTopLevelIndexAndFilter - if top-level index and filter blocks should be pinned.public boolean hashIndexAllowCollision()
public BlockBasedTableConfig setHashIndexAllowCollision(boolean hashIndexAllowCollision)
hashIndexAllowCollision - points out if hash collisions should be allowed.public long blockCacheCompressedSize()
public BlockBasedTableConfig setBlockCacheCompressedSize(long blockCacheCompressedSize)
blockCacheCompressedSize - of compressed block cache.public int blockCacheCompressedNumShardBits()
public BlockBasedTableConfig setBlockCacheCompressedNumShardBits(int blockCacheCompressedNumShardBits)
blockCacheCompressedNumShardBits - the number of shard bits. The resulting
number of shards would be 2 ^ numShardBits. Any negative
number means use default settings."public BlockBasedTableConfig setChecksumType(ChecksumType checksumType)
checksumType - ChecksumType value.public ChecksumType checksumType()
public BlockBasedTableConfig setIndexType(IndexType indexType)
indexType - IndexType valuepublic IndexType indexType()
public BlockBasedTableConfig setFormatVersion(int formatVersion)
We currently have three versions:
This option only affects newly written tables. When reading existing tables, the information about version is read from the footer.
formatVersion - integer representing the version to be used.public int formatVersion()
setFormatVersion(int).protected long newTableFactoryHandle()
TableFormatConfigThis function should only be called by Options.setTableFormatConfig(), which will create a c++ shared-pointer to the c++ TableFactory that associated with the Java TableFormatConfig.
newTableFactoryHandle in class TableFormatConfig