Package org.apache.kafka.streams.state
Interface RocksDBConfigSetter
public interface RocksDBConfigSetter
An interface to that allows developers to customize the RocksDB settings for a given Store.
Please read the RocksDB Tuning Guide.
Note: if you choose to modify the
org.rocksdb.BlockBasedTableConfig
you should retrieve a reference to
the existing one (rather than create a new BlockBasedTableConfig object) so as to not lose the other default settings.
This can be done as BlockBasedTableConfig tableConfig = (BlockBasedTableConfig) options.tableFormatConfig();
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Close any user-constructed objects that inherit fromorg.rocksdb.RocksObject
.void
Set the rocks db options for the provided storeName.
-
Field Details
-
LOG
static final org.slf4j.Logger LOG
-
-
Method Details
-
setConfig
Set the rocks db options for the provided storeName.- Parameters:
storeName
- the name of the store being configuredoptions
- the RocksDB optionsconfigs
- the configuration supplied toStreamsConfig
-
close
Close any user-constructed objects that inherit fromorg.rocksdb.RocksObject
.Any object created with
new
insetConfig()
and that inherits fromorg.rocksdb.RocksObject
should haveorg.rocksdb.RocksObject#close()
called on it here to avoid leaking off-heap memory. Objects to be closed can be saved by the user or retrieved back fromoptions
using its getter methods.Example objects needing to be closed include
org.rocksdb.Filter
andorg.rocksdb.Cache
.- Parameters:
storeName
- the name of the store being configuredoptions
- the RocksDB options
-