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

      Fields 
      Modifier and Type Field Description
      static org.slf4j.Logger LOG  
    • Field Detail

      • LOG

        static final org.slf4j.Logger LOG
    • Method Detail

      • setConfig

        void setConfig​(String storeName,
                       org.rocksdb.Options options,
                       Map<String,​Object> configs)
        Set the rocks db options for the provided storeName.
        Parameters:
        storeName - the name of the store being configured
        options - the RocksDB options
        configs - the configuration supplied to StreamsConfig
      • close

        default void close​(String storeName,
                           org.rocksdb.Options options)
        Close any user-constructed objects that inherit from org.rocksdb.RocksObject.

        Any object created with new in setConfig() and that inherits from org.rocksdb.RocksObject should have org.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 from options using its getter methods.

        Example objects needing to be closed include org.rocksdb.Filter and org.rocksdb.Cache.

        Parameters:
        storeName - the name of the store being configured
        options - the RocksDB options