public enum PredefinedOptions extends Enum<PredefinedOptions>
PredefinedOptions
are configuration settings for the EmbeddedRocksDBStateBackend
. The various pre-defined choices are configurations that have been
empirically determined to be beneficial for performance under different settings.
Some of these settings are based on experiments by the Flink community, some follow guides from the RocksDB project.
All of them effectively disable the RocksDB log by default because this file would grow indefinitely and will be deleted with the TM anyway.
The PredefinedOptions
are designed to cope with different situations. If some
configurations should be enabled unconditionally, they are not included in any of the pre-defined
options. Please check RocksDBResourceContainer.createBaseCommonDBOptions()
and RocksDBResourceContainer.createBaseCommonColumnOptions()
for common settings. Note that
setUseFsync(false) is set by default irrespective of the PredefinedOptions
setting.
Because Flink does not rely on RocksDB data on disk for recovery, there is no need to sync data
to stable storage.
Enum Constant and Description |
---|
DEFAULT
Default options for all settings.
|
FLASH_SSD_OPTIMIZED
Pre-defined options for Flash SSDs.
|
SPINNING_DISK_OPTIMIZED
Pre-defined options for regular spinning hard disks.
|
SPINNING_DISK_OPTIMIZED_HIGH_MEM
Pre-defined options for better performance on regular spinning hard disks, at the cost of a
higher memory consumption.
|
Modifier and Type | Method and Description |
---|---|
static PredefinedOptions |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PredefinedOptions[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PredefinedOptions DEFAULT
There are no specified options here.
public static final PredefinedOptions SPINNING_DISK_OPTIMIZED
This constant configures RocksDB with some options that lead empirically to better performance when the machines executing the system use regular spinning hard disks.
The following options are set:
public static final PredefinedOptions SPINNING_DISK_OPTIMIZED_HIGH_MEM
NOTE: These settings will cause RocksDB to consume a lot of memory for block caching
and compactions. If you experience out-of-memory problems related to, RocksDB, consider
switching back to SPINNING_DISK_OPTIMIZED
.
The following options are set:
RocksDBConfigurableOptions.BLOOM_FILTER_BITS_PER_KEY
, RocksDBConfigurableOptions.BLOOM_FILTER_BLOCK_BASED_MODE
)
Enabling use of a Bloom filter here is equivalent to setting RocksDBConfigurableOptions.USE_BLOOM_FILTER
.
public static final PredefinedOptions FLASH_SSD_OPTIMIZED
This constant configures RocksDB with some options that lead empirically to better performance when the machines executing the system use SSDs.
The following options are set:
public static PredefinedOptions[] values()
for (PredefinedOptions c : PredefinedOptions.values()) System.out.println(c);
public static PredefinedOptions valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.