Package org.rocksdb
Class MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder
- java.lang.Object
-
- org.rocksdb.AbstractMutableOptions.AbstractMutableOptionsBuilder<MutableColumnFamilyOptions,MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder,org.rocksdb.MutableColumnFamilyOptions.MutableColumnFamilyOptionKey>
-
- org.rocksdb.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder
-
- All Implemented Interfaces:
AdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>,MutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>
- Enclosing class:
- MutableColumnFamilyOptions
public static class MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder extends AbstractMutableOptions.AbstractMutableOptionsBuilder<MutableColumnFamilyOptions,MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder,org.rocksdb.MutableColumnFamilyOptions.MutableColumnFamilyOptionKey> implements MutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,org.rocksdb.MutableColumnFamilyOptions.MutableColumnFamilyOptionKey>allKeys()Get all of the possible keyslongarenaBlockSize()The size of one block in arena memory allocation.longblobCompactionReadaheadSize()Get compaction readahead for blob files.CompressionTypeblobCompressionType()Get the compression algorithm in use for large values stored in blob files.longblobFileSize()The size limit for blob files.intblobFileStartingLevel()Get the starting LSM tree level to enable blob files.doubleblobGarbageCollectionAgeCutoff()Get cutoff in terms of blob file age for garbage collection.doubleblobGarbageCollectionForceThreshold()Get the current value for theAdvancedMutableColumnFamilyOptionsInterface.blobGarbageCollectionForceThreshold()protected MutableColumnFamilyOptionsbuild(java.lang.String[] keys, java.lang.String[] values)Construct a sub-class instance ofAbstractMutableOptions.CompressionTypecompressionType()Compress blocks using the specified compression algorithm.booleandisableAutoCompactions()Disable automatic compactions.booleanenableBlobFiles()When set, large values (blobs) are written to separate blob files, and only pointers to them are stored in SST files.booleanenableBlobGarbageCollection()Query whether garbage collection of blobs is enabled.Blob GC is performed as part of compaction.doubleexperimentalMempurgeThreshold()Threshold used in the MemPurge (memtable garbage collection) feature.longhardPendingCompactionBytesLimit()All writes are stopped if estimated bytes needed to be compaction exceed this threshold.longinplaceUpdateNumLocks()Number of locks used for inplace update Default: 10000, if inplace_update_support = true, else 0.intlevel0FileNumCompactionTrigger()Number of files to trigger level-0 compaction.intlevel0SlowdownWritesTrigger()Soft limit on number of level-0 files.intlevel0StopWritesTrigger()Maximum number of level-0 files.longmaxBytesForLevelBase()The upper-bound of the total size of level-1 files in bytes.doublemaxBytesForLevelMultiplier()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.longmaxCompactionBytes()We try to limit number of bytes in one compaction to be lower than this threshold.longmaxSequentialSkipInIterations()An iteration->Next() sequentially skips over keys with the same user-key unless this option is set.longmaxSuccessiveMerges()Maximum number of successive merge operations on a key in the memtable.intmaxWriteBufferNumber()Returns maximum number of write buffers.longmemtableHugePageSize()Page size for huge page TLB for bloom in memtable.doublememtablePrefixBloomSizeRatio()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.booleanmemtableWholeKeyFiltering()Returns whether whole key bloom filter is enabled in memtablelongminBlobSize()Get the size of the smallest value to be stored separately in a blob file.booleanparanoidFileChecks()After writing every SST file, reopen it and read all the keys.longperiodicCompactionSeconds()Get the periodicCompactionSeconds.PrepopulateBlobCacheprepopulateBlobCache()Get the prepopulate blob cache option.booleanreportBgIoStats()Determine whether IO stats in compactions and flushes are being measuredprotected MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilderself()MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetArenaBlockSize(long arenaBlockSize)The size of one block in arena memory allocation.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetBlobCompactionReadaheadSize(long blobCompactionReadaheadSize)Set compaction readahead for blob files.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetBlobCompressionType(CompressionType compressionType)Set the compression algorithm to use for large values stored in blob files.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetBlobFileSize(long blobFileSize)Set the size limit for blob files.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetBlobFileStartingLevel(int blobFileStartingLevel)Set a certain LSM tree level to enable blob files.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetBlobGarbageCollectionAgeCutoff(double blobGarbageCollectionAgeCutoff)Set cutoff in terms of blob file age for garbage collection.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetBlobGarbageCollectionForceThreshold(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 ofAdvancedMutableColumnFamilyOptionsInterface.blobGarbageCollectionAgeCutoff()above.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetCompressionType(CompressionType compressionType)Compress blocks using the specified compression algorithm.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetDisableAutoCompactions(boolean disableAutoCompactions)Disable automatic compactions.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetEnableBlobFiles(boolean enableBlobFiles)When set, large values (blobs) are written to separate blob files, and only pointers to them are stored in SST files.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetEnableBlobGarbageCollection(boolean enableBlobGarbageCollection)Enable/disable garbage collection of blobs.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetExperimentalMempurgeThreshold(double experimentalMempurgeThreshold)Threshold used in the MemPurge (memtable garbage collection) feature.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetHardPendingCompactionBytesLimit(long hardPendingCompactionBytesLimit)All writes are stopped if estimated bytes needed to be compaction exceed this threshold.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetInplaceUpdateNumLocks(long inplaceUpdateNumLocks)Number of locks used for inplace update Default: 10000, if inplace_update_support = true, else 0.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetLevel0FileNumCompactionTrigger(int level0FileNumCompactionTrigger)Number of files to trigger level-0 compaction.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetLevel0SlowdownWritesTrigger(int level0SlowdownWritesTrigger)Soft limit on number of level-0 files.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetLevel0StopWritesTrigger(int level0StopWritesTrigger)Maximum number of level-0 files.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMaxBytesForLevelBase(long maxBytesForLevelBase)The upper-bound of the total size of level-1 files in bytes.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMaxBytesForLevelMultiplier(double maxBytesForLevelMultiplier)The ratio between the total size of level-(L+1) files and the total size of level-L files for all L.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMaxBytesForLevelMultiplierAdditional(int[] maxBytesForLevelMultiplierAdditional)Different max-size multipliers for different levels.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMaxCompactionBytes(long maxCompactionBytes)We try to limit number of bytes in one compaction to be lower than this threshold.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMaxSequentialSkipInIterations(long maxSequentialSkipInIterations)An iteration->Next() sequentially skips over keys with the same user-key unless this option is set.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMaxSuccessiveMerges(long maxSuccessiveMerges)Maximum number of successive merge operations on a key in the memtable.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMaxWriteBufferNumber(int maxWriteBufferNumber)The maximum number of write buffers that are built up in memory.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMemtableHugePageSize(long memtableHugePageSize)Page size for huge page TLB for bloom in memtable.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMemtablePrefixBloomSizeRatio(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.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMemtableWholeKeyFiltering(boolean memtableWholeKeyFiltering)Enable whole key bloom filter in memtable.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetMinBlobSize(long minBlobSize)Set the size of the smallest value to be stored separately in a blob file.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetParanoidFileChecks(boolean paranoidFileChecks)After writing every SST file, reopen it and read all the keys.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetPeriodicCompactionSeconds(long periodicCompactionSeconds)Files older than this value will be picked up for compaction, and re-written to the same level as they were before.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetPrepopulateBlobCache(PrepopulateBlobCache prepopulateBlobCache)Set a certain prepopulate blob cache option.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetReportBgIoStats(boolean reportBgIoStats)Measure IO stats in compactions and flushes, if true.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetSoftPendingCompactionBytesLimit(long softPendingCompactionBytesLimit)All writes will be slowed down to at least delayed_write_rate if estimated bytes needed to be compaction exceed this threshold.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetTargetFileSizeBase(long targetFileSizeBase)The target file size for compaction.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetTargetFileSizeMultiplier(int targetFileSizeMultiplier)targetFileSizeMultiplier defines the size ratio between a level-L file and level-(L+1) file.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetTtl(long ttl)Non-bottom-level files older than TTL will go through the compaction process.MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuildersetWriteBufferSize(long writeBufferSize)Amount of data to build up in memory (backed by an unsorted log on disk) before converting to a sorted on-disk file.longsoftPendingCompactionBytesLimit()All writes will be slowed down to at least delayed_write_rate if estimated bytes needed to be compaction exceed this threshold.longtargetFileSizeBase()The target file size for compaction.inttargetFileSizeMultiplier()targetFileSizeMultiplier defines the size ratio between a level-(L+1) file and level-L file.longttl()Get the TTL for Non-bottom-level files that will go through the compaction process.longwriteBufferSize()Return size of write buffer size.-
Methods inherited from class org.rocksdb.AbstractMutableOptions.AbstractMutableOptionsBuilder
build, fromParsed, getBoolean, getDouble, getEnum, getInt, getIntArray, getLong, getUnknown, setBoolean, setDouble, setEnum, setInt, setIntArray, setLong
-
-
-
-
Method Detail
-
self
protected MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder self()
- Specified by:
selfin classAbstractMutableOptions.AbstractMutableOptionsBuilder<MutableColumnFamilyOptions,MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder,org.rocksdb.MutableColumnFamilyOptions.MutableColumnFamilyOptionKey>
-
allKeys
protected java.util.Map<java.lang.String,org.rocksdb.MutableColumnFamilyOptions.MutableColumnFamilyOptionKey> allKeys()
Description copied from class:AbstractMutableOptions.AbstractMutableOptionsBuilderGet all of the possible keys- Specified by:
allKeysin classAbstractMutableOptions.AbstractMutableOptionsBuilder<MutableColumnFamilyOptions,MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder,org.rocksdb.MutableColumnFamilyOptions.MutableColumnFamilyOptionKey>- Returns:
- A map of all keys, indexed by name.
-
build
protected MutableColumnFamilyOptions build(java.lang.String[] keys, java.lang.String[] values)
Description copied from class:AbstractMutableOptions.AbstractMutableOptionsBuilderConstruct a sub-class instance ofAbstractMutableOptions.- Specified by:
buildin classAbstractMutableOptions.AbstractMutableOptionsBuilder<MutableColumnFamilyOptions,MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder,org.rocksdb.MutableColumnFamilyOptions.MutableColumnFamilyOptionKey>- Parameters:
keys- the keysvalues- the values- Returns:
- an instance of the options.
-
setWriteBufferSize
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setWriteBufferSize(long writeBufferSize)
Description copied from interface:MutableColumnFamilyOptionsInterfaceAmount of data to build up in memory (backed by an unsorted log on disk) before converting to a sorted on-disk file. Larger values increase performance, especially during bulk loads. Up tomax_write_buffer_numberwrite buffers may be held in memory at the same time, so you may wish to adjust this parameter to control memory usage. Also, a larger write buffer will result in a longer recovery time the next time the database is opened. Default: 64MB- Specified by:
setWriteBufferSizein interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
writeBufferSize- the size of write buffer.- Returns:
- the instance of the current object.
-
writeBufferSize
public long writeBufferSize()
Description copied from interface:MutableColumnFamilyOptionsInterfaceReturn size of write buffer size.- Specified by:
writeBufferSizein interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- size of write buffer.
- See Also:
MutableColumnFamilyOptionsInterface.setWriteBufferSize(long)
-
setArenaBlockSize
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setArenaBlockSize(long arenaBlockSize)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceThe size of one block in arena memory allocation. If ≤ 0, a proper value is automatically calculated (usually 1/10 of writer_buffer_size). 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- Specified by:
setArenaBlockSizein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
arenaBlockSize- the size of an arena block- Returns:
- the reference to the current options.
-
arenaBlockSize
public long arenaBlockSize()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceThe size of one block in arena memory allocation. If ≤ 0, a proper value is automatically calculated (usually 1/10 of writer_buffer_size). 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- Specified by:
arenaBlockSizein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the size of an arena block
-
setMemtablePrefixBloomSizeRatio
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMemtablePrefixBloomSizeRatio(double memtablePrefixBloomSizeRatio)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceif 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. If it is larger than 0.25, it is santinized to 0.25. Default: 0 (disabled)- Specified by:
setMemtablePrefixBloomSizeRatioin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
memtablePrefixBloomSizeRatio- the ratio of memtable used by the bloom filter, 0 means no bloom filter- Returns:
- the reference to the current options.
-
memtablePrefixBloomSizeRatio
public double memtablePrefixBloomSizeRatio()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceif 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. If it is larger than 0.25, it is santinized to 0.25. Default: 0 (disabled)- Specified by:
memtablePrefixBloomSizeRatioin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the ratio of memtable used by the bloom filter
-
setMemtableWholeKeyFiltering
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMemtableWholeKeyFiltering(boolean memtableWholeKeyFiltering)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceEnable whole key bloom filter in memtable. Note this will only take effect if memtable_prefix_bloom_size_ratio is not 0. Enabling whole key filtering can potentially reduce CPU usage for point-look-ups. Default: false (disabled)- Specified by:
setMemtableWholeKeyFilteringin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
memtableWholeKeyFiltering- true if whole key bloom filter is enabled in memtable- Returns:
- the reference to the current options.
-
memtableWholeKeyFiltering
public boolean memtableWholeKeyFiltering()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceReturns whether whole key bloom filter is enabled in memtable- Specified by:
memtableWholeKeyFilteringin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- true if whole key bloom filter is enabled in memtable
-
setMemtableHugePageSize
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMemtableHugePageSize(long memtableHugePageSize)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfacePage size for huge page TLB for bloom in memtable. If ≤ 0, not allocate from huge page TLB but from malloc. Need to reserve huge pages for it to be allocated. For example: sysctl -w vm.nr_hugepages=20 See linux doc Documentation/vm/hugetlbpage.txt- Specified by:
setMemtableHugePageSizein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
memtableHugePageSize- The page size of the huge page tlb- Returns:
- the reference to the current options.
-
memtableHugePageSize
public long memtableHugePageSize()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfacePage size for huge page TLB for bloom in memtable. If ≤ 0, not allocate from huge page TLB but from malloc. Need to reserve huge pages for it to be allocated. For example: sysctl -w vm.nr_hugepages=20 See linux doc Documentation/vm/hugetlbpage.txt- Specified by:
memtableHugePageSizein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- The page size of the huge page tlb
-
setMaxSuccessiveMerges
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMaxSuccessiveMerges(long maxSuccessiveMerges)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceMaximum number of successive merge operations on a key in the memtable. 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)- Specified by:
setMaxSuccessiveMergesin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
maxSuccessiveMerges- the maximum number of successive merges.- Returns:
- the reference to the current options.
-
maxSuccessiveMerges
public long maxSuccessiveMerges()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceMaximum number of successive merge operations on a key in the memtable. 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)- Specified by:
maxSuccessiveMergesin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the maximum number of successive merges.
-
setMaxWriteBufferNumber
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMaxWriteBufferNumber(int maxWriteBufferNumber)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceThe maximum number of write buffers that are built up in memory. The default is 2, so that when 1 write buffer is being flushed to storage, new writes can continue to the other write buffer. Default: 2- Specified by:
setMaxWriteBufferNumberin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
maxWriteBufferNumber- maximum number of write buffers.- Returns:
- the instance of the current options.
-
maxWriteBufferNumber
public int maxWriteBufferNumber()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceReturns maximum number of write buffers.- Specified by:
maxWriteBufferNumberin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- maximum number of write buffers.
- See Also:
AdvancedMutableColumnFamilyOptionsInterface.setMaxWriteBufferNumber(int)
-
setInplaceUpdateNumLocks
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setInplaceUpdateNumLocks(long inplaceUpdateNumLocks)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceNumber of locks used for inplace update Default: 10000, if inplace_update_support = true, else 0.- Specified by:
setInplaceUpdateNumLocksin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
inplaceUpdateNumLocks- the number of locks used for inplace updates.- Returns:
- the reference to the current options.
-
inplaceUpdateNumLocks
public long inplaceUpdateNumLocks()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceNumber of locks used for inplace update Default: 10000, if inplace_update_support = true, else 0.- Specified by:
inplaceUpdateNumLocksin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the number of locks used for inplace update.
-
setExperimentalMempurgeThreshold
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setExperimentalMempurgeThreshold(double experimentalMempurgeThreshold)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceThreshold used in the MemPurge (memtable garbage collection) feature. A value of 0.0 corresponds to no MemPurge, a value of 1.0 will trigger a MemPurge as often as possible. Default: 0.0 (disabled)- Specified by:
setExperimentalMempurgeThresholdin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
experimentalMempurgeThreshold- the threshold used by the MemPurge decider.- Returns:
- the reference to the current options.
-
experimentalMempurgeThreshold
public double experimentalMempurgeThreshold()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceThreshold used in the MemPurge (memtable garbage collection) feature. A value of 0.0 corresponds to no MemPurge, a value of 1.0 will trigger a MemPurge as often as possible. Default: 0 (disabled)- Specified by:
experimentalMempurgeThresholdin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the threshold used by the MemPurge decider
-
setDisableAutoCompactions
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setDisableAutoCompactions(boolean disableAutoCompactions)
Description copied from interface:MutableColumnFamilyOptionsInterfaceDisable automatic compactions. Manual compactions can still be issued on this column family- Specified by:
setDisableAutoCompactionsin interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
disableAutoCompactions- true if auto-compactions are disabled.- Returns:
- the reference to the current option.
-
disableAutoCompactions
public boolean disableAutoCompactions()
Description copied from interface:MutableColumnFamilyOptionsInterfaceDisable automatic compactions. Manual compactions can still be issued on this column family- Specified by:
disableAutoCompactionsin interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- true if auto-compactions are disabled.
-
setSoftPendingCompactionBytesLimit
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setSoftPendingCompactionBytesLimit(long softPendingCompactionBytesLimit)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceAll writes will be slowed down to at least delayed_write_rate if estimated bytes needed to be compaction exceed this threshold. Default: 64GB- Specified by:
setSoftPendingCompactionBytesLimitin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
softPendingCompactionBytesLimit- The soft limit to impose on compaction- Returns:
- the reference to the current options.
-
softPendingCompactionBytesLimit
public long softPendingCompactionBytesLimit()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceAll writes will be slowed down to at least delayed_write_rate if estimated bytes needed to be compaction exceed this threshold. Default: 64GB- Specified by:
softPendingCompactionBytesLimitin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- The soft limit to impose on compaction
-
setHardPendingCompactionBytesLimit
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setHardPendingCompactionBytesLimit(long hardPendingCompactionBytesLimit)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceAll writes are stopped if estimated bytes needed to be compaction exceed this threshold. Default: 256GB- Specified by:
setHardPendingCompactionBytesLimitin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
hardPendingCompactionBytesLimit- The hard limit to impose on compaction- Returns:
- the reference to the current options.
-
hardPendingCompactionBytesLimit
public long hardPendingCompactionBytesLimit()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceAll writes are stopped if estimated bytes needed to be compaction exceed this threshold. Default: 256GB- Specified by:
hardPendingCompactionBytesLimitin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- The hard limit to impose on compaction
-
setLevel0FileNumCompactionTrigger
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setLevel0FileNumCompactionTrigger(int level0FileNumCompactionTrigger)
Description copied from interface:MutableColumnFamilyOptionsInterfaceNumber of files to trigger level-0 compaction. A value < 0 means that level-0 compaction will not be triggered by number of files at all. Default: 4- Specified by:
setLevel0FileNumCompactionTriggerin interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
level0FileNumCompactionTrigger- The number of files to trigger level-0 compaction- Returns:
- the reference to the current option.
-
level0FileNumCompactionTrigger
public int level0FileNumCompactionTrigger()
Description copied from interface:MutableColumnFamilyOptionsInterfaceNumber of files to trigger level-0 compaction. A value < 0 means that level-0 compaction will not be triggered by number of files at all. Default: 4- Specified by:
level0FileNumCompactionTriggerin interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- The number of files to trigger
-
setLevel0SlowdownWritesTrigger
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setLevel0SlowdownWritesTrigger(int level0SlowdownWritesTrigger)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceSoft limit on number of level-0 files. We start slowing down writes at this point. A value < 0 means that no writing slow down will be triggered by number of files in level-0.- Specified by:
setLevel0SlowdownWritesTriggerin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
level0SlowdownWritesTrigger- The soft limit on the number of level-0 files- Returns:
- the reference to the current options.
-
level0SlowdownWritesTrigger
public int level0SlowdownWritesTrigger()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceSoft limit on number of level-0 files. We start slowing down writes at this point. A value < 0 means that no writing slow down will be triggered by number of files in level-0.- Specified by:
level0SlowdownWritesTriggerin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- The soft limit on the number of level-0 files
-
setLevel0StopWritesTrigger
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setLevel0StopWritesTrigger(int level0StopWritesTrigger)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceMaximum number of level-0 files. We stop writes at this point.- Specified by:
setLevel0StopWritesTriggerin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
level0StopWritesTrigger- The maximum number of level-0 files- Returns:
- the reference to the current options.
-
level0StopWritesTrigger
public int level0StopWritesTrigger()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceMaximum number of level-0 files. We stop writes at this point.- Specified by:
level0StopWritesTriggerin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- The maximum number of level-0 files
-
setMaxCompactionBytes
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMaxCompactionBytes(long maxCompactionBytes)
Description copied from interface:MutableColumnFamilyOptionsInterfaceWe try to limit number of bytes in one compaction to be lower than this threshold. But it's not guaranteed. Value 0 will be sanitized.- Specified by:
setMaxCompactionBytesin interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
maxCompactionBytes- max bytes in a compaction- Returns:
- the reference to the current option.
- See Also:
MutableColumnFamilyOptionsInterface.maxCompactionBytes()
-
maxCompactionBytes
public long maxCompactionBytes()
Description copied from interface:MutableColumnFamilyOptionsInterfaceWe try to limit number of bytes in one compaction to be lower than this threshold. But it's not guaranteed. Value 0 will be sanitized.- Specified by:
maxCompactionBytesin interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the maximum number of bytes in for a compaction.
- See Also:
MutableColumnFamilyOptionsInterface.setMaxCompactionBytes(long)
-
setTargetFileSizeBase
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setTargetFileSizeBase(long targetFileSizeBase)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceThe target file size for compaction. This targetFileSizeBase determines a level-1 file size. Target file size for level L can be calculated by targetFileSizeBase * (targetFileSizeMultiplier ^ (L-1)) For example, if targetFileSizeBase is 2MB and target_file_size_multiplier is 10, then each file on level-1 will be 2MB, and each file on level 2 will be 20MB, and each file on level-3 will be 200MB. by default targetFileSizeBase is 64MB.- Specified by:
setTargetFileSizeBasein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
targetFileSizeBase- the target size of a level-0 file.- Returns:
- the reference to the current options.
- See Also:
AdvancedMutableColumnFamilyOptionsInterface.setTargetFileSizeMultiplier(int)
-
targetFileSizeBase
public long targetFileSizeBase()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceThe target file size for compaction. This targetFileSizeBase determines a level-1 file size. Target file size for level L can be calculated by targetFileSizeBase * (targetFileSizeMultiplier ^ (L-1)) For example, if targetFileSizeBase is 2MB and target_file_size_multiplier is 10, then each file on level-1 will be 2MB, and each file on level 2 will be 20MB, and each file on level-3 will be 200MB. by default targetFileSizeBase is 64MB.- Specified by:
targetFileSizeBasein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the target size of a level-0 file.
- See Also:
AdvancedMutableColumnFamilyOptionsInterface.targetFileSizeMultiplier()
-
setTargetFileSizeMultiplier
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setTargetFileSizeMultiplier(int targetFileSizeMultiplier)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfacetargetFileSizeMultiplier defines the size ratio between a level-L file and level-(L+1) file. By default target_file_size_multiplier is 1, meaning files in different levels have the same target.- Specified by:
setTargetFileSizeMultiplierin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
targetFileSizeMultiplier- the size ratio between a level-(L+1) file and level-L file.- Returns:
- the reference to the current options.
-
targetFileSizeMultiplier
public int targetFileSizeMultiplier()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfacetargetFileSizeMultiplier defines the size ratio between a level-(L+1) file and level-L file. By default targetFileSizeMultiplier is 1, meaning files in different levels have the same target.- Specified by:
targetFileSizeMultiplierin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the size ratio between a level-(L+1) file and level-L file.
-
setMaxBytesForLevelBase
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMaxBytesForLevelBase(long maxBytesForLevelBase)
Description copied from interface:MutableColumnFamilyOptionsInterfaceThe upper-bound of the total size of level-1 files in bytes. Maximum number of bytes for level L can be calculated as (maxBytesForLevelBase) * (maxBytesForLevelMultiplier ^ (L-1)) For example, if maxBytesForLevelBase is 20MB, and if max_bytes_for_level_multiplier is 10, total data size for level-1 will be 200MB, total file size for level-2 will be 2GB, and total file size for level-3 will be 20GB. by default 'maxBytesForLevelBase' is 256MB.- Specified by:
setMaxBytesForLevelBasein interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
maxBytesForLevelBase- maximum bytes for level base.- Returns:
- the reference to the current option.
See
AdvancedMutableColumnFamilyOptionsInterface.setMaxBytesForLevelMultiplier(double)
-
maxBytesForLevelBase
public long maxBytesForLevelBase()
Description copied from interface:MutableColumnFamilyOptionsInterfaceThe upper-bound of the total size of level-1 files in bytes. Maximum number of bytes for level L can be calculated as (maxBytesForLevelBase) * (maxBytesForLevelMultiplier ^ (L-1)) For example, if maxBytesForLevelBase is 20MB, and if max_bytes_for_level_multiplier is 10, total data size for level-1 will be 200MB, total file size for level-2 will be 2GB, and total file size for level-3 will be 20GB. by default 'maxBytesForLevelBase' is 256MB.- Specified by:
maxBytesForLevelBasein interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the upper-bound of the total size of level-1 files
in bytes.
See
AdvancedMutableColumnFamilyOptionsInterface.maxBytesForLevelMultiplier()
-
setMaxBytesForLevelMultiplier
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMaxBytesForLevelMultiplier(double maxBytesForLevelMultiplier)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceThe ratio between the total size of level-(L+1) files and the total size of level-L files for all L. DEFAULT: 10- Specified by:
setMaxBytesForLevelMultiplierin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
maxBytesForLevelMultiplier- the ratio between the total size of level-(L+1) files and the total size of level-L files for all L.- Returns:
- the reference to the current options.
See
MutableColumnFamilyOptionsInterface.setMaxBytesForLevelBase(long)
-
maxBytesForLevelMultiplier
public double maxBytesForLevelMultiplier()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceThe ratio between the total size of level-(L+1) files and the total size of level-L files for all L. DEFAULT: 10- Specified by:
maxBytesForLevelMultiplierin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the ratio between the total size of level-(L+1) files and
the total size of level-L files for all L.
See
MutableColumnFamilyOptionsInterface.maxBytesForLevelBase()
-
setMaxBytesForLevelMultiplierAdditional
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMaxBytesForLevelMultiplierAdditional(int[] maxBytesForLevelMultiplierAdditional)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceDifferent max-size multipliers for different levels. These are multiplied by max_bytes_for_level_multiplier to arrive at the max-size of each level. Default: 1- Specified by:
setMaxBytesForLevelMultiplierAdditionalin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
maxBytesForLevelMultiplierAdditional- The max-size multipliers for each level- Returns:
- the reference to the current options.
-
maxBytesForLevelMultiplierAdditional
public int[] maxBytesForLevelMultiplierAdditional()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceDifferent max-size multipliers for different levels. These are multiplied by max_bytes_for_level_multiplier to arrive at the max-size of each level. Default: 1- Specified by:
maxBytesForLevelMultiplierAdditionalin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- The max-size multipliers for each level
-
setMaxSequentialSkipInIterations
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMaxSequentialSkipInIterations(long maxSequentialSkipInIterations)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceAn iteration->Next() sequentially skips over keys with the same user-key unless this option is set. This number specifies the number of keys (with the same userkey) that will be sequentially skipped before a reseek is issued. Default: 8- Specified by:
setMaxSequentialSkipInIterationsin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
maxSequentialSkipInIterations- the number of keys could be skipped in a iteration.- Returns:
- the reference to the current options.
-
maxSequentialSkipInIterations
public long maxSequentialSkipInIterations()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceAn iteration->Next() sequentially skips over keys with the same user-key unless this option is set. This number specifies the number of keys (with the same userkey) that will be sequentially skipped before a reseek is issued. Default: 8- Specified by:
maxSequentialSkipInIterationsin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the number of keys could be skipped in a iteration.
-
setParanoidFileChecks
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setParanoidFileChecks(boolean paranoidFileChecks)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceAfter writing every SST file, reopen it and read all the keys. Default: false- Specified by:
setParanoidFileChecksin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
paranoidFileChecks- true to enable paranoid file checks- Returns:
- the reference to the current options.
-
paranoidFileChecks
public boolean paranoidFileChecks()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceAfter writing every SST file, reopen it and read all the keys. Default: false- Specified by:
paranoidFileChecksin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- true if paranoid file checks are enabled
-
setCompressionType
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setCompressionType(CompressionType compressionType)
Description copied from interface:MutableColumnFamilyOptionsInterfaceCompress blocks using the specified compression algorithm. This parameter can be changed dynamically. Default: SNAPPY_COMPRESSION, which gives lightweight but fast compression.- Specified by:
setCompressionTypein interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
compressionType- Compression Type.- Returns:
- the reference to the current option.
-
compressionType
public CompressionType compressionType()
Description copied from interface:MutableColumnFamilyOptionsInterfaceCompress blocks using the specified compression algorithm. This parameter can be changed dynamically. Default: SNAPPY_COMPRESSION, which gives lightweight but fast compression.- Specified by:
compressionTypein interfaceMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- Compression type.
-
setReportBgIoStats
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setReportBgIoStats(boolean reportBgIoStats)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceMeasure IO stats in compactions and flushes, if true. Default: false- Specified by:
setReportBgIoStatsin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
reportBgIoStats- true to enable reporting- Returns:
- the reference to the current options.
-
reportBgIoStats
public boolean reportBgIoStats()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceDetermine whether IO stats in compactions and flushes are being measured- Specified by:
reportBgIoStatsin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- true if reporting is enabled
-
setTtl
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setTtl(long ttl)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceNon-bottom-level files older than TTL will go through the compaction process. This needsMutableDBOptionsInterface.maxOpenFiles()to be set to -1. Enabled only for level compaction for now. Default: 0 (disabled) Dynamically changeable throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
setTtlin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
ttl- the time-to-live.- Returns:
- the reference to the current options.
-
ttl
public long ttl()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceGet the TTL for Non-bottom-level files that will go through the compaction process. SeeAdvancedMutableColumnFamilyOptionsInterface.setTtl(long).- Specified by:
ttlin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the time-to-live.
-
setPeriodicCompactionSeconds
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setPeriodicCompactionSeconds(long periodicCompactionSeconds)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceFiles older than this value will be picked up for compaction, and re-written to the same level as they were before. One main use of the feature is to make sure a file goes through compaction filters periodically. Users can also use the feature to clear up SST files using old format. 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 throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
setPeriodicCompactionSecondsin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
periodicCompactionSeconds- the periodic compaction in seconds.- Returns:
- the reference to the current options.
-
periodicCompactionSeconds
public long periodicCompactionSeconds()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceGet the periodicCompactionSeconds. SeeAdvancedMutableColumnFamilyOptionsInterface.setPeriodicCompactionSeconds(long).- Specified by:
periodicCompactionSecondsin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the periodic compaction in seconds.
-
setEnableBlobFiles
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setEnableBlobFiles(boolean enableBlobFiles)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceWhen set, large values (blobs) are written to separate blob files, and only pointers to them are stored in SST files. This can reduce write amplification for large-value use cases at the cost of introducing a level of indirection for reads. See also the options min_blob_size, blob_file_size, blob_compression_type, enable_blob_garbage_collection, and blob_garbage_collection_age_cutoff below. Default: false Dynamically changeable throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
setEnableBlobFilesin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
enableBlobFiles- true iff blob files should be enabled- Returns:
- the reference to the current options.
-
enableBlobFiles
public boolean enableBlobFiles()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceWhen set, large values (blobs) are written to separate blob files, and only pointers to them are stored in SST files. This can reduce write amplification for large-value use cases at the cost of introducing a level of indirection for reads. See also the options min_blob_size, blob_file_size, blob_compression_type, enable_blob_garbage_collection, and blob_garbage_collection_age_cutoff below. Default: false Dynamically changeable throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
enableBlobFilesin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- true if blob files are enabled
-
setMinBlobSize
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setMinBlobSize(long minBlobSize)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceSet the size of the smallest value to be stored separately in a blob file. Values which have an uncompressed size smaller than this threshold are stored alongside the keys in SST files in the usual fashion. A value of zero for this option means that all values are stored in blob files. Note that enable_blob_files has to be set in order for this option to have any effect. Default: 0 Dynamically changeable throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
setMinBlobSizein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
minBlobSize- the size of the smallest value to be stored separately in a blob file- Returns:
- the reference to the current options.
-
minBlobSize
public long minBlobSize()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceGet the size of the smallest value to be stored separately in a blob file. Values which have an uncompressed size smaller than this threshold are stored alongside the keys in SST files in the usual fashion. A value of zero for this option means that all values are stored in blob files. Note that enable_blob_files has to be set in order for this option to have any effect. Default: 0 Dynamically changeable throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
minBlobSizein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the current minimum size of value which is stored separately in a blob
-
setBlobFileSize
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setBlobFileSize(long blobFileSize)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceSet the size limit for blob files. When writing blob files, a new file is opened once this limit is reached. Note that enable_blob_files has to be set in order for this option to have any effect. Default: 256 MB Dynamically changeable throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
setBlobFileSizein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
blobFileSize- the size limit for blob files- Returns:
- the reference to the current options.
-
blobFileSize
public long blobFileSize()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceThe size limit for blob files. When writing blob files, a new file is opened once this limit is reached.- Specified by:
blobFileSizein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the current size limit for blob files
-
setBlobCompressionType
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setBlobCompressionType(CompressionType compressionType)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceSet the compression algorithm to use for large values stored in blob files. Note that enable_blob_files has to be set in order for this option to have any effect. Default: no compression Dynamically changeable throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
setBlobCompressionTypein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
compressionType- the compression algorithm to use.- Returns:
- the reference to the current options.
-
blobCompressionType
public CompressionType blobCompressionType()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceGet the compression algorithm in use for large values stored in blob files. Note that enable_blob_files has to be set in order for this option to have any effect.- Specified by:
blobCompressionTypein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the current compression algorithm
-
setEnableBlobGarbageCollection
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setEnableBlobGarbageCollection(boolean enableBlobGarbageCollection)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceEnable/disable garbage collection of blobs. Blob GC is performed as part of compaction. Valid blobs residing in blob files older than a cutoff get relocated to new files as they are encountered during compaction, which makes it possible to clean up blob files once they contain nothing but obsolete/garbage blobs. See also blob_garbage_collection_age_cutoff below. Default: false- Specified by:
setEnableBlobGarbageCollectionin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
enableBlobGarbageCollection- the new enabled/disabled state of blob garbage collection- Returns:
- the reference to the current options.
-
enableBlobGarbageCollection
public boolean enableBlobGarbageCollection()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceQuery whether garbage collection of blobs is enabled.Blob GC is performed as part of compaction. Valid blobs residing in blob files older than a cutoff get relocated to new files as they are encountered during compaction, which makes it possible to clean up blob files once they contain nothing but obsolete/garbage blobs. See also blob_garbage_collection_age_cutoff below. Default: false- Specified by:
enableBlobGarbageCollectionin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- true if blob garbage collection is currently enabled.
-
setBlobGarbageCollectionAgeCutoff
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setBlobGarbageCollectionAgeCutoff(double blobGarbageCollectionAgeCutoff)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceSet cutoff in terms of blob file age for garbage collection. Blobs in the oldest N blob files will be relocated when encountered during compaction, where N = garbage_collection_cutoff * number_of_blob_files. Note that enable_blob_garbage_collection has to be set in order for this option to have any effect. Default: 0.25- Specified by:
setBlobGarbageCollectionAgeCutoffin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
blobGarbageCollectionAgeCutoff- the new age cutoff- Returns:
- the reference to the current options.
-
blobGarbageCollectionAgeCutoff
public double blobGarbageCollectionAgeCutoff()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceGet cutoff in terms of blob file age for garbage collection. Blobs in the oldest N blob files will be relocated when encountered during compaction, where N = garbage_collection_cutoff * number_of_blob_files. Note that enable_blob_garbage_collection has to be set in order for this option to have any effect. Default: 0.25- Specified by:
blobGarbageCollectionAgeCutoffin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the current age cutoff for garbage collection
-
setBlobGarbageCollectionForceThreshold
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setBlobGarbageCollectionForceThreshold(double blobGarbageCollectionForceThreshold)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceIf 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 ofAdvancedMutableColumnFamilyOptionsInterface.blobGarbageCollectionAgeCutoff()above. This option is currently only supported with leveled compactions. Note thatAdvancedMutableColumnFamilyOptionsInterface.enableBlobGarbageCollection()has to be set in order for this option to have any effect. Default: 1.0 Dynamically changeable through the SetOptions() API- Specified by:
setBlobGarbageCollectionForceThresholdin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
blobGarbageCollectionForceThreshold- new value for the threshold- Returns:
- the reference to the current options
-
blobGarbageCollectionForceThreshold
public double blobGarbageCollectionForceThreshold()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceGet the current value for theAdvancedMutableColumnFamilyOptionsInterface.blobGarbageCollectionForceThreshold()- Specified by:
blobGarbageCollectionForceThresholdin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the current threshold at which garbage collection of blobs is forced
-
setBlobCompactionReadaheadSize
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setBlobCompactionReadaheadSize(long blobCompactionReadaheadSize)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceSet compaction readahead for blob files. Default: 0 Dynamically changeable throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
setBlobCompactionReadaheadSizein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
blobCompactionReadaheadSize- the compaction readahead for blob files- Returns:
- the reference to the current options.
-
blobCompactionReadaheadSize
public long blobCompactionReadaheadSize()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceGet compaction readahead for blob files.- Specified by:
blobCompactionReadaheadSizein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the current compaction readahead for blob files
-
setBlobFileStartingLevel
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setBlobFileStartingLevel(int blobFileStartingLevel)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceSet a certain LSM tree level to enable blob files. Default: 0 Dynamically changeable throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
setBlobFileStartingLevelin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
blobFileStartingLevel- the starting level to enable blob files- Returns:
- the reference to the current options.
-
blobFileStartingLevel
public int blobFileStartingLevel()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceGet the starting LSM tree level to enable blob files. Default: 0- Specified by:
blobFileStartingLevelin interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the current LSM tree level to enable blob files.
-
setPrepopulateBlobCache
public MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder setPrepopulateBlobCache(PrepopulateBlobCache prepopulateBlobCache)
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceSet a certain prepopulate blob cache option. Default: 0 Dynamically changeable throughRocksDB.setOptions(ColumnFamilyHandle, MutableColumnFamilyOptions).- Specified by:
setPrepopulateBlobCachein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Parameters:
prepopulateBlobCache- the prepopulate blob cache option- Returns:
- the reference to the current options.
-
prepopulateBlobCache
public PrepopulateBlobCache prepopulateBlobCache()
Description copied from interface:AdvancedMutableColumnFamilyOptionsInterfaceGet the prepopulate blob cache option. Default: 0- Specified by:
prepopulateBlobCachein interfaceAdvancedMutableColumnFamilyOptionsInterface<MutableColumnFamilyOptions.MutableColumnFamilyOptionsBuilder>- Returns:
- the current prepopulate blob cache option.
-
-