public interface AdvancedMutableColumnFamilyOptionsInterface<T extends AdvancedMutableColumnFamilyOptionsInterface<T>>
Taken from include/rocksdb/advanced_options.h and MutableCFOptions in util/cf_options.h
Modifier and Type | Method and Description |
---|---|
long |
arenaBlockSize()
The size of one block in arena memory allocation.
|
long |
blobCompactionReadaheadSize()
Get compaction readahead for blob files.
|
CompressionType |
blobCompressionType()
Get the compression algorithm in use for large values stored in blob files.
|
long |
blobFileSize()
The size limit for blob files.
|
int |
blobFileStartingLevel()
Get the starting LSM tree level to enable blob files.
|
double |
blobGarbageCollectionAgeCutoff()
Get cutoff in terms of blob file age for garbage collection.
|
double |
blobGarbageCollectionForceThreshold()
Get the current value for the
#blobGarbageCollectionForceThreshold |
boolean |
enableBlobFiles()
When set, large values (blobs) are written to separate blob files, and only
pointers to them are stored in SST files.
|
boolean |
enableBlobGarbageCollection()
Query whether garbage collection of blobs is enabled.Blob GC is performed as part of
compaction.
|
double |
experimentalMempurgeThreshold()
Threshold used in the MemPurge (memtable garbage collection)
feature.
|
long |
hardPendingCompactionBytesLimit()
All writes are stopped if estimated bytes needed to be compaction exceed
this threshold.
|
long |
inplaceUpdateNumLocks()
Number of locks used for inplace update
Default: 10000, if inplace_update_support = true, else 0.
|
int |
level0SlowdownWritesTrigger()
Soft limit on number of level-0 files.
|
int |
level0StopWritesTrigger()
Maximum number of level-0 files.
|
double |
maxBytesForLevelMultiplier()
The ratio between the total size of level-(L+1) files and the total
size of level-L files for all L.
|
int[] |
maxBytesForLevelMultiplierAdditional()
Different max-size multipliers for different levels.
|
long |
maxSequentialSkipInIterations()
An iteration->Next() sequentially skips over keys with the same
user-key unless this option is set.
|
long |
maxSuccessiveMerges()
Maximum number of successive merge operations on a key in the memtable.
|
int |
maxWriteBufferNumber()
Returns maximum number of write buffers.
|
long |
memtableHugePageSize()
Page size for huge page TLB for bloom in memtable.
|
double |
memtablePrefixBloomSizeRatio()
if prefix_extractor is set and memtable_prefix_bloom_size_ratio is not 0,
create prefix bloom for memtable with the size of
write_buffer_size * memtable_prefix_bloom_size_ratio.
|
boolean |
memtableWholeKeyFiltering()
Returns whether whole key bloom filter is enabled in memtable
|
long |
minBlobSize()
Get the size of the smallest value to be stored separately in a blob file.
|
boolean |
paranoidFileChecks()
After writing every SST file, reopen it and read all the keys.
|
long |
periodicCompactionSeconds()
Get the periodicCompactionSeconds.
|
PrepopulateBlobCache |
prepopulateBlobCache()
Get the prepopulate blob cache option.
|
boolean |
reportBgIoStats()
Determine whether IO stats in compactions and flushes are being measured
|
T |
setArenaBlockSize(long arenaBlockSize)
The size of one block in arena memory allocation.
|
T |
setBlobCompactionReadaheadSize(long blobCompactionReadaheadSize)
Set compaction readahead for blob files.
|
T |
setBlobCompressionType(CompressionType compressionType)
Set the compression algorithm to use for large values stored in blob files.
|
T |
setBlobFileSize(long blobFileSize)
Set the size limit for blob files.
|
T |
setBlobFileStartingLevel(int blobFileStartingLevel)
Set a certain LSM tree level to enable blob files.
|
T |
setBlobGarbageCollectionAgeCutoff(double blobGarbageCollectionAgeCutoff)
Set cutoff in terms of blob file age for garbage collection.
|
T |
setBlobGarbageCollectionForceThreshold(double blobGarbageCollectionForceThreshold)
If the ratio of garbage in the oldest blob files exceeds this threshold,
targeted compactions are scheduled in order to force garbage collecting
the blob files in question, assuming they are all eligible based on the
value of
blobGarbageCollectionAgeCutoff() above. |
T |
setEnableBlobFiles(boolean enableBlobFiles)
When set, large values (blobs) are written to separate blob files, and only
pointers to them are stored in SST files.
|
T |
setEnableBlobGarbageCollection(boolean enableBlobGarbageCollection)
Enable/disable garbage collection of blobs.
|
T |
setExperimentalMempurgeThreshold(double experimentalMempurgeThreshold)
Threshold used in the MemPurge (memtable garbage collection)
feature.
|
T |
setHardPendingCompactionBytesLimit(long hardPendingCompactionBytesLimit)
All writes are stopped if estimated bytes needed to be compaction exceed
this threshold.
|
T |
setInplaceUpdateNumLocks(long inplaceUpdateNumLocks)
Number of locks used for inplace update
Default: 10000, if inplace_update_support = true, else 0.
|
T |
setLevel0SlowdownWritesTrigger(int level0SlowdownWritesTrigger)
Soft limit on number of level-0 files.
|
T |
setLevel0StopWritesTrigger(int level0StopWritesTrigger)
Maximum number of level-0 files.
|
T |
setMaxBytesForLevelMultiplier(double multiplier)
The ratio between the total size of level-(L+1) files and the total
size of level-L files for all L.
|
T |
setMaxBytesForLevelMultiplierAdditional(int[] maxBytesForLevelMultiplierAdditional)
Different max-size multipliers for different levels.
|
T |
setMaxSequentialSkipInIterations(long maxSequentialSkipInIterations)
An iteration->Next() sequentially skips over keys with the same
user-key unless this option is set.
|
T |
setMaxSuccessiveMerges(long maxSuccessiveMerges)
Maximum number of successive merge operations on a key in the memtable.
|
T |
setMaxWriteBufferNumber(int maxWriteBufferNumber)
The maximum number of write buffers that are built up in memory.
|
T |
setMemtableHugePageSize(long memtableHugePageSize)
Page size for huge page TLB for bloom in memtable.
|
T |
setMemtablePrefixBloomSizeRatio(double memtablePrefixBloomSizeRatio)
if prefix_extractor is set and memtable_prefix_bloom_size_ratio is not 0,
create prefix bloom for memtable with the size of
write_buffer_size * memtable_prefix_bloom_size_ratio.
|
T |
setMemtableWholeKeyFiltering(boolean memtableWholeKeyFiltering)
Enable whole key bloom filter in memtable.
|
T |
setMinBlobSize(long minBlobSize)
Set the size of the smallest value to be stored separately in a blob file.
|
T |
setParanoidFileChecks(boolean paranoidFileChecks)
After writing every SST file, reopen it and read all the keys.
|
T |
setPeriodicCompactionSeconds(long periodicCompactionSeconds)
Files older than this value will be picked up for compaction, and
re-written to the same level as they were before.
|
T |
setPrepopulateBlobCache(PrepopulateBlobCache prepopulateBlobCache)
Set a certain prepopulate blob cache option.
|
T |
setReportBgIoStats(boolean reportBgIoStats)
Measure IO stats in compactions and flushes, if true.
|
T |
setSoftPendingCompactionBytesLimit(long softPendingCompactionBytesLimit)
All writes will be slowed down to at least delayed_write_rate if estimated
bytes needed to be compaction exceed this threshold.
|
T |
setTargetFileSizeBase(long targetFileSizeBase)
The target file size for compaction.
|
T |
setTargetFileSizeMultiplier(int multiplier)
targetFileSizeMultiplier defines the size ratio between a
level-L file and level-(L+1) file.
|
T |
setTtl(long ttl)
Non-bottom-level files older than TTL will go through the compaction
process.
|
long |
softPendingCompactionBytesLimit()
All writes will be slowed down to at least delayed_write_rate if estimated
bytes needed to be compaction exceed this threshold.
|
long |
targetFileSizeBase()
The target file size for compaction.
|
int |
targetFileSizeMultiplier()
targetFileSizeMultiplier defines the size ratio between a
level-(L+1) file and level-L file.
|
long |
ttl()
Get the TTL for Non-bottom-level files that will go through the compaction
process.
|
T setMaxWriteBufferNumber(int maxWriteBufferNumber)
maxWriteBufferNumber
- maximum number of write buffers.int maxWriteBufferNumber()
setMaxWriteBufferNumber(int)
T setInplaceUpdateNumLocks(long inplaceUpdateNumLocks)
inplaceUpdateNumLocks
- the number of locks used for
inplace updates.java.lang.IllegalArgumentException
- thrown on 32-Bit platforms
while overflowing the underlying platform specific value.long inplaceUpdateNumLocks()
T setMemtablePrefixBloomSizeRatio(double memtablePrefixBloomSizeRatio)
Default: 0 (disabled)
memtablePrefixBloomSizeRatio
- the ratio of memtable used by the
bloom filter, 0 means no bloom filterdouble memtablePrefixBloomSizeRatio()
Default: 0 (disabled)
T setExperimentalMempurgeThreshold(double experimentalMempurgeThreshold)
Default: 0.0 (disabled)
experimentalMempurgeThreshold
- the threshold used by
the MemPurge decider.double experimentalMempurgeThreshold()
Default: 0 (disabled)
T setMemtableWholeKeyFiltering(boolean memtableWholeKeyFiltering)
Default: false (disabled)
memtableWholeKeyFiltering
- true if whole key bloom filter is enabled
in memtableboolean memtableWholeKeyFiltering()
T setMemtableHugePageSize(long memtableHugePageSize)
memtableHugePageSize
- The page size of the huge
page tlblong memtableHugePageSize()
T setArenaBlockSize(long arenaBlockSize)
There are two additional restriction of the specified size: (1) size should be in the range of [4096, 2 << 30] and (2) be the multiple of the CPU word (which helps with the memory alignment).
We'll automatically check and adjust the size number to make sure it conforms to the restrictions. Default: 0
arenaBlockSize
- the size of an arena blockjava.lang.IllegalArgumentException
- thrown on 32-Bit platforms
while overflowing the underlying platform specific value.long arenaBlockSize()
There are two additional restriction of the specified size: (1) size should be in the range of [4096, 2 << 30] and (2) be the multiple of the CPU word (which helps with the memory alignment).
We'll automatically check and adjust the size number to make sure it conforms to the restrictions. Default: 0
T setLevel0SlowdownWritesTrigger(int level0SlowdownWritesTrigger)
level0SlowdownWritesTrigger
- The soft limit on the number of
level-0 filesint level0SlowdownWritesTrigger()
T setLevel0StopWritesTrigger(int level0StopWritesTrigger)
level0StopWritesTrigger
- The maximum number of level-0 filesint level0StopWritesTrigger()
T setTargetFileSizeBase(long targetFileSizeBase)
targetFileSizeBase
- the target size of a level-0 file.setTargetFileSizeMultiplier(int)
long targetFileSizeBase()
targetFileSizeMultiplier()
T setTargetFileSizeMultiplier(int multiplier)
multiplier
- the size ratio between a level-(L+1) file
and level-L file.int targetFileSizeMultiplier()
T setMaxBytesForLevelMultiplier(double multiplier)
multiplier
- the ratio between the total size of level-(L+1)
files and the total size of level-L files for all L.
See MutableColumnFamilyOptionsInterface.setMaxBytesForLevelBase(long)
double maxBytesForLevelMultiplier()
See MutableColumnFamilyOptionsInterface.maxBytesForLevelBase()
T setMaxBytesForLevelMultiplierAdditional(int[] maxBytesForLevelMultiplierAdditional)
Default: 1
maxBytesForLevelMultiplierAdditional
- The max-size multipliers
for each levelint[] maxBytesForLevelMultiplierAdditional()
Default: 1
T setSoftPendingCompactionBytesLimit(long softPendingCompactionBytesLimit)
Default: 64GB
softPendingCompactionBytesLimit
- The soft limit to impose on
compactionlong softPendingCompactionBytesLimit()
Default: 64GB
T setHardPendingCompactionBytesLimit(long hardPendingCompactionBytesLimit)
Default: 256GB
hardPendingCompactionBytesLimit
- The hard limit to impose on
compactionlong hardPendingCompactionBytesLimit()
Default: 256GB
T setMaxSequentialSkipInIterations(long maxSequentialSkipInIterations)
maxSequentialSkipInIterations
- the number of keys could
be skipped in an iteration.long maxSequentialSkipInIterations()
T setMaxSuccessiveMerges(long maxSuccessiveMerges)
When a merge operation is added to the memtable and the maximum number of successive merges is reached, the value of the key will be calculated and inserted into the memtable instead of the merge operation. This will ensure that there are never more than max_successive_merges merge operations in the memtable.
Default: 0 (disabled)
maxSuccessiveMerges
- the maximum number of successive merges.java.lang.IllegalArgumentException
- thrown on 32-Bit platforms
while overflowing the underlying platform specific value.long maxSuccessiveMerges()
When a merge operation is added to the memtable and the maximum number of successive merges is reached, the value of the key will be calculated and inserted into the memtable instead of the merge operation. This will ensure that there are never more than max_successive_merges merge operations in the memtable.
Default: 0 (disabled)
T setParanoidFileChecks(boolean paranoidFileChecks)
Default: false
paranoidFileChecks
- true to enable paranoid file checksboolean paranoidFileChecks()
Default: false
T setReportBgIoStats(boolean reportBgIoStats)
Default: false
reportBgIoStats
- true to enable reportingboolean reportBgIoStats()
T setTtl(long ttl)
MutableDBOptionsInterface.maxOpenFiles()
to be
set to -1.
Enabled only for level compaction for now.
Default: 0 (disabled)
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
ttl
- the time-to-live.long ttl()
See setTtl(long)
.
T setPeriodicCompactionSeconds(long periodicCompactionSeconds)
A file's age is computed by looking at file_creation_time or creation_time table properties in order, if they have valid non-zero values; if not, the age is based on the file's last modified time (given by the underlying Env).
Supported in Level and FIFO compaction. In FIFO compaction, this option has the same meaning as TTL and whichever stricter will be used. Pre-req: max_open_file == -1. unit: seconds. Ex: 7 days = 7 * 24 * 60 * 60
Values: 0: Turn off Periodic compactions. UINT64_MAX - 1 (i.e 0xfffffffffffffffe): Let RocksDB control this feature as needed. For now, RocksDB will change this value to 30 days (i.e 30 * 24 * 60 * 60) so that every file goes through the compaction process at least once every 30 days if not compacted sooner. In FIFO compaction, since the option has the same meaning as ttl, when this value is left default, and ttl is left to 0, 30 days will be used. Otherwise, min(ttl, periodic_compaction_seconds) will be used.
Default: 0xfffffffffffffffe (allow RocksDB to auto-tune)
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
periodicCompactionSeconds
- the periodic compaction in seconds.long periodicCompactionSeconds()
T setEnableBlobFiles(boolean enableBlobFiles)
Default: false
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
enableBlobFiles
- true iff blob files should be enabledboolean enableBlobFiles()
Default: false
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
T setMinBlobSize(long minBlobSize)
Default: 0
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
minBlobSize
- the size of the smallest value to be stored separately in a blob filelong minBlobSize()
Default: 0
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
T setBlobFileSize(long blobFileSize)
Default: 256 MB
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
blobFileSize
- the size limit for blob fileslong blobFileSize()
T setBlobCompressionType(CompressionType compressionType)
Default: no compression
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
compressionType
- the compression algorithm to use.CompressionType blobCompressionType()
T setEnableBlobGarbageCollection(boolean enableBlobGarbageCollection)
Default: false
enableBlobGarbageCollection
- the new enabled/disabled state of blob garbage collectionboolean enableBlobGarbageCollection()
Default: false
T setBlobGarbageCollectionAgeCutoff(double blobGarbageCollectionAgeCutoff)
Default: 0.25
blobGarbageCollectionAgeCutoff
- the new age cutoffdouble blobGarbageCollectionAgeCutoff()
Default: 0.25
T setBlobGarbageCollectionForceThreshold(double blobGarbageCollectionForceThreshold)
blobGarbageCollectionAgeCutoff()
above. This option is
currently only supported with leveled compactions.
Note that enableBlobGarbageCollection()
has to be set in order for this
option to have any effect.
Default: 1.0
Dynamically changeable through the SetOptions() API
blobGarbageCollectionForceThreshold
- new value for the thresholddouble blobGarbageCollectionForceThreshold()
#blobGarbageCollectionForceThreshold
T setBlobCompactionReadaheadSize(long blobCompactionReadaheadSize)
Default: 0
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
blobCompactionReadaheadSize
- the compaction readahead for blob fileslong blobCompactionReadaheadSize()
T setBlobFileStartingLevel(int blobFileStartingLevel)
Default: 0
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
blobFileStartingLevel
- the starting level to enable blob filesint blobFileStartingLevel()
Default: 0
T setPrepopulateBlobCache(PrepopulateBlobCache prepopulateBlobCache)
Default: 0
Dynamically changeable through
RocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions)
.
prepopulateBlobCache
- prepopulate the blob cache optionPrepopulateBlobCache prepopulateBlobCache()
Default: 0