public class DefaultConfigurableOptionsFactory extends Object implements ConfigurableRocksDBOptionsFactory
ConfigurableRocksDBOptionsFactory using options provided by RocksDBConfigurableOptions. It acts as the default options factory within EmbeddedRocksDBStateBackend if the user did not define a RocksDBOptionsFactory.| Constructor and Description |
|---|
DefaultConfigurableOptionsFactory() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateNativeMetricsOptions, createReadOptions, createWriteOptionspublic org.rocksdb.DBOptions createDBOptions(org.rocksdb.DBOptions currentOptions,
Collection<AutoCloseable> handlesToClose)
RocksDBOptionsFactoryIt is important to set the options on the current object and return the result from the setter methods, otherwise the pre-defined options may get lost.
createDBOptions in interface RocksDBOptionsFactorycurrentOptions - The options object with the pre-defined options.handlesToClose - The collection to register newly created RocksObjects.public org.rocksdb.ColumnFamilyOptions createColumnOptions(org.rocksdb.ColumnFamilyOptions currentOptions,
Collection<AutoCloseable> handlesToClose)
RocksDBOptionsFactoryIt is important to set the options on the current object and return the result from the setter methods, otherwise the pre-defined options may get lost.
createColumnOptions in interface RocksDBOptionsFactorycurrentOptions - The options object with the pre-defined options.handlesToClose - The collection to register newly created RocksObjects.public DefaultConfigurableOptionsFactory setMaxBackgroundThreads(int totalThreadCount)
public DefaultConfigurableOptionsFactory setMaxOpenFiles(int maxOpenFiles)
public DefaultConfigurableOptionsFactory setLogLevel(org.rocksdb.InfoLogLevel logLevel)
public DefaultConfigurableOptionsFactory setLogDir(String logDir)
logDir - If empty, log files will be in the same directory as data filespublic DefaultConfigurableOptionsFactory setMaxLogFileSize(String maxLogFileSize)
If the log files becomes larger than this, a new file will be created. If 0, all logs will be written to one log file.
maxLogFileSize - max file size limitpublic DefaultConfigurableOptionsFactory setLogFileNum(int logFileNum)
logFileNum - number of files to keeppublic DefaultConfigurableOptionsFactory setCompactionStyle(org.rocksdb.CompactionStyle compactionStyle)
public DefaultConfigurableOptionsFactory setUseDynamicLevelSize(boolean value)
public DefaultConfigurableOptionsFactory setTargetFileSizeBase(String targetFileSizeBase)
public DefaultConfigurableOptionsFactory setMaxSizeLevelBase(String maxSizeLevelBase)
public DefaultConfigurableOptionsFactory setWriteBufferSize(String writeBufferSize)
public DefaultConfigurableOptionsFactory setMaxWriteBufferNumber(int writeBufferNumber)
public DefaultConfigurableOptionsFactory setMinWriteBufferNumberToMerge(int writeBufferNumber)
public DefaultConfigurableOptionsFactory setBlockSize(String blockSize)
public DefaultConfigurableOptionsFactory setMetadataBlockSize(String metadataBlockSize)
public DefaultConfigurableOptionsFactory setBlockCacheSize(String blockCacheSize)
public DefaultConfigurableOptionsFactory setUseBloomFilter(boolean useBloomFilter)
public DefaultConfigurableOptionsFactory setBloomFilterBitsPerKey(double bitsPerKey)
public DefaultConfigurableOptionsFactory setBloomFilterBlockBasedMode(boolean blockBasedMode)
public DefaultConfigurableOptionsFactory configure(org.apache.flink.configuration.ReadableConfig configuration)
DefaultConfigurableOptionsFactory instance from a ReadableConfig.
If no options within RocksDBConfigurableOptions has ever been configured, the
created RocksDBOptionsFactory would not override anything defined in PredefinedOptions.
configure in interface ConfigurableRocksDBOptionsFactoryconfiguration - Configuration to be used for the ConfigurableRocksDBOptionsFactory
creationCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.