@Deprecated 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.
After FLINK-24046, we refactor the config procedure for RocksDB. User could use ConfigurableRocksDBOptionsFactory to apply some customized options. Besides this, we load the
configurable options in RocksDBResourceContainer instead of DefaultConfigurableOptionsFactory. It is ignored for general case and still kept for backward
compatibility if user still leverage this class. Thus, we mark this factory Deprecated.
| Constructor and Description |
|---|
DefaultConfigurableOptionsFactory()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
DefaultConfigurableOptionsFactory |
configure(org.apache.flink.configuration.ReadableConfig configuration)
Deprecated.
Creates a
DefaultConfigurableOptionsFactory instance from a ReadableConfig. |
org.rocksdb.ColumnFamilyOptions |
createColumnOptions(org.rocksdb.ColumnFamilyOptions currentOptions,
Collection<AutoCloseable> handlesToClose)
Deprecated.
This method should set the additional options on top of the current options object.
|
org.rocksdb.DBOptions |
createDBOptions(org.rocksdb.DBOptions currentOptions,
Collection<AutoCloseable> handlesToClose)
Deprecated.
This method should set the additional options on top of the current options object.
|
Map<String,String> |
getConfiguredOptions()
Deprecated.
|
DefaultConfigurableOptionsFactory |
setBlockCacheSize(String blockCacheSize)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setBlockSize(String blockSize)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setBloomFilterBitsPerKey(double bitsPerKey)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setBloomFilterBlockBasedMode(boolean blockBasedMode)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setCompactionStyle(org.rocksdb.CompactionStyle compactionStyle)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setLogDir(String logDir)
Deprecated.
The directory for RocksDB's logging files.
|
DefaultConfigurableOptionsFactory |
setLogFileNum(int logFileNum)
Deprecated.
The maximum number of files RocksDB should keep for logging.
|
DefaultConfigurableOptionsFactory |
setLogLevel(org.rocksdb.InfoLogLevel logLevel)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setMaxBackgroundThreads(int totalThreadCount)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setMaxLogFileSize(String maxLogFileSize)
Deprecated.
The maximum size of RocksDB's file used for logging.
|
DefaultConfigurableOptionsFactory |
setMaxOpenFiles(int maxOpenFiles)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setMaxSizeLevelBase(String maxSizeLevelBase)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setMaxWriteBufferNumber(int writeBufferNumber)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setMetadataBlockSize(String metadataBlockSize)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setMinWriteBufferNumberToMerge(int writeBufferNumber)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setTargetFileSizeBase(String targetFileSizeBase)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setUseBloomFilter(boolean useBloomFilter)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setUseDynamicLevelSize(boolean value)
Deprecated.
|
DefaultConfigurableOptionsFactory |
setWriteBufferSize(String writeBufferSize)
Deprecated.
|
String |
toString()
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateNativeMetricsOptions, createReadOptions, createWriteOptionspublic DefaultConfigurableOptionsFactory()
public 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–2025 The Apache Software Foundation. All rights reserved.