Class DefaultConfigurableOptionsFactory
- java.lang.Object
-
- org.apache.flink.contrib.streaming.state.DefaultConfigurableOptionsFactory
-
- All Implemented Interfaces:
Serializable,ConfigurableRocksDBOptionsFactory,RocksDBOptionsFactory
@Deprecated public class DefaultConfigurableOptionsFactory extends Object implements ConfigurableRocksDBOptionsFactory
Deprecated.An implementation ofConfigurableRocksDBOptionsFactoryusing options provided byRocksDBConfigurableOptions. It acts as the default options factory withinEmbeddedRocksDBStateBackendif the user did not define aRocksDBOptionsFactory.After FLINK-24046, we refactor the config procedure for RocksDB. User could use
ConfigurableRocksDBOptionsFactoryto apply some customized options. Besides this, we load the configurable options inRocksDBResourceContainerinstead ofDefaultConfigurableOptionsFactory. It is ignored for general case and still kept for backward compatibility if user still leverage this class. Thus, we mark this factory Deprecated.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultConfigurableOptionsFactory()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DefaultConfigurableOptionsFactoryconfigure(org.apache.flink.configuration.ReadableConfig configuration)Deprecated.Creates aDefaultConfigurableOptionsFactoryinstance from aReadableConfig.org.rocksdb.ColumnFamilyOptionscreateColumnOptions(org.rocksdb.ColumnFamilyOptions currentOptions, Collection<AutoCloseable> handlesToClose)Deprecated.This method should set the additional options on top of the current options object.org.rocksdb.DBOptionscreateDBOptions(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.DefaultConfigurableOptionsFactorysetBlockCacheSize(String blockCacheSize)Deprecated.DefaultConfigurableOptionsFactorysetBlockSize(String blockSize)Deprecated.DefaultConfigurableOptionsFactorysetBloomFilterBitsPerKey(double bitsPerKey)Deprecated.DefaultConfigurableOptionsFactorysetBloomFilterBlockBasedMode(boolean blockBasedMode)Deprecated.DefaultConfigurableOptionsFactorysetCompactionStyle(org.rocksdb.CompactionStyle compactionStyle)Deprecated.DefaultConfigurableOptionsFactorysetLogDir(String logDir)Deprecated.The directory for RocksDB's logging files.DefaultConfigurableOptionsFactorysetLogFileNum(int logFileNum)Deprecated.The maximum number of files RocksDB should keep for logging.DefaultConfigurableOptionsFactorysetLogLevel(org.rocksdb.InfoLogLevel logLevel)Deprecated.DefaultConfigurableOptionsFactorysetMaxBackgroundThreads(int totalThreadCount)Deprecated.DefaultConfigurableOptionsFactorysetMaxLogFileSize(String maxLogFileSize)Deprecated.The maximum size of RocksDB's file used for logging.DefaultConfigurableOptionsFactorysetMaxOpenFiles(int maxOpenFiles)Deprecated.DefaultConfigurableOptionsFactorysetMaxSizeLevelBase(String maxSizeLevelBase)Deprecated.DefaultConfigurableOptionsFactorysetMaxWriteBufferNumber(int writeBufferNumber)Deprecated.DefaultConfigurableOptionsFactorysetMetadataBlockSize(String metadataBlockSize)Deprecated.DefaultConfigurableOptionsFactorysetMinWriteBufferNumberToMerge(int writeBufferNumber)Deprecated.DefaultConfigurableOptionsFactorysetTargetFileSizeBase(String targetFileSizeBase)Deprecated.DefaultConfigurableOptionsFactorysetUseBloomFilter(boolean useBloomFilter)Deprecated.DefaultConfigurableOptionsFactorysetUseDynamicLevelSize(boolean value)Deprecated.DefaultConfigurableOptionsFactorysetWriteBufferSize(String writeBufferSize)Deprecated.StringtoString()Deprecated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.flink.contrib.streaming.state.RocksDBOptionsFactory
createNativeMetricsOptions, createReadOptions, createWriteOptions
-
-
-
-
Method Detail
-
createDBOptions
public org.rocksdb.DBOptions createDBOptions(org.rocksdb.DBOptions currentOptions, Collection<AutoCloseable> handlesToClose)Deprecated.Description copied from interface:RocksDBOptionsFactoryThis method should set the additional options on top of the current options object. The current options object may contain pre-defined options based on flags that have been configured on the state backend.It 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.
- Specified by:
createDBOptionsin interfaceRocksDBOptionsFactory- Parameters:
currentOptions- The options object with the pre-defined options.handlesToClose- The collection to register newly createdRocksObjects.- Returns:
- The options object on which the additional options are set.
-
createColumnOptions
public org.rocksdb.ColumnFamilyOptions createColumnOptions(org.rocksdb.ColumnFamilyOptions currentOptions, Collection<AutoCloseable> handlesToClose)Deprecated.Description copied from interface:RocksDBOptionsFactoryThis method should set the additional options on top of the current options object. The current options object may contain pre-defined options based on flags that have been configured on the state backend.It 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.
- Specified by:
createColumnOptionsin interfaceRocksDBOptionsFactory- Parameters:
currentOptions- The options object with the pre-defined options.handlesToClose- The collection to register newly createdRocksObjects.- Returns:
- The options object on which the additional options are set.
-
setMaxBackgroundThreads
public DefaultConfigurableOptionsFactory setMaxBackgroundThreads(int totalThreadCount)
Deprecated.
-
setMaxOpenFiles
public DefaultConfigurableOptionsFactory setMaxOpenFiles(int maxOpenFiles)
Deprecated.
-
setLogLevel
public DefaultConfigurableOptionsFactory setLogLevel(org.rocksdb.InfoLogLevel logLevel)
Deprecated.
-
setLogDir
public DefaultConfigurableOptionsFactory setLogDir(String logDir)
Deprecated.The directory for RocksDB's logging files.- Parameters:
logDir- If empty, log files will be in the same directory as data files
If non-empty, this directory will be used and the data directory's absolute path will be used as the prefix of the log file name.- Returns:
- this options factory
-
setMaxLogFileSize
public DefaultConfigurableOptionsFactory setMaxLogFileSize(String maxLogFileSize)
Deprecated.The maximum size of RocksDB's file used for logging.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.
- Parameters:
maxLogFileSize- max file size limit- Returns:
- this options factory
-
setLogFileNum
public DefaultConfigurableOptionsFactory setLogFileNum(int logFileNum)
Deprecated.The maximum number of files RocksDB should keep for logging.- Parameters:
logFileNum- number of files to keep- Returns:
- this options factory
-
setCompactionStyle
public DefaultConfigurableOptionsFactory setCompactionStyle(org.rocksdb.CompactionStyle compactionStyle)
Deprecated.
-
setUseDynamicLevelSize
public DefaultConfigurableOptionsFactory setUseDynamicLevelSize(boolean value)
Deprecated.
-
setTargetFileSizeBase
public DefaultConfigurableOptionsFactory setTargetFileSizeBase(String targetFileSizeBase)
Deprecated.
-
setMaxSizeLevelBase
public DefaultConfigurableOptionsFactory setMaxSizeLevelBase(String maxSizeLevelBase)
Deprecated.
-
setWriteBufferSize
public DefaultConfigurableOptionsFactory setWriteBufferSize(String writeBufferSize)
Deprecated.
-
setMaxWriteBufferNumber
public DefaultConfigurableOptionsFactory setMaxWriteBufferNumber(int writeBufferNumber)
Deprecated.
-
setMinWriteBufferNumberToMerge
public DefaultConfigurableOptionsFactory setMinWriteBufferNumberToMerge(int writeBufferNumber)
Deprecated.
-
setBlockSize
public DefaultConfigurableOptionsFactory setBlockSize(String blockSize)
Deprecated.
-
setMetadataBlockSize
public DefaultConfigurableOptionsFactory setMetadataBlockSize(String metadataBlockSize)
Deprecated.
-
setBlockCacheSize
public DefaultConfigurableOptionsFactory setBlockCacheSize(String blockCacheSize)
Deprecated.
-
setUseBloomFilter
public DefaultConfigurableOptionsFactory setUseBloomFilter(boolean useBloomFilter)
Deprecated.
-
setBloomFilterBitsPerKey
public DefaultConfigurableOptionsFactory setBloomFilterBitsPerKey(double bitsPerKey)
Deprecated.
-
setBloomFilterBlockBasedMode
public DefaultConfigurableOptionsFactory setBloomFilterBlockBasedMode(boolean blockBasedMode)
Deprecated.
-
configure
public DefaultConfigurableOptionsFactory configure(org.apache.flink.configuration.ReadableConfig configuration)
Deprecated.Creates aDefaultConfigurableOptionsFactoryinstance from aReadableConfig.If no options within
RocksDBConfigurableOptionshas ever been configured, the created RocksDBOptionsFactory would not override anything defined inPredefinedOptions.- Specified by:
configurein interfaceConfigurableRocksDBOptionsFactory- Parameters:
configuration- Configuration to be used for the ConfigurableRocksDBOptionsFactory creation- Returns:
- A ConfigurableRocksDBOptionsFactory created from the given configuration
-
-