public final class RocksDBMemoryConfiguration extends Object implements Serializable
Constructor and Description |
---|
RocksDBMemoryConfiguration() |
Modifier and Type | Method and Description |
---|---|
static RocksDBMemoryConfiguration |
fromConfiguration(Configuration configuration) |
static RocksDBMemoryConfiguration |
fromOtherAndConfiguration(RocksDBMemoryConfiguration other,
ReadableConfig config)
Derives a RocksDBMemoryConfiguration from another object and a configuration.
|
MemorySize |
getFixedMemoryPerSlot()
Gets the fixed amount of memory to be shared between all RocksDB instances (in all tasks and
operators) of a slot.
|
double |
getHighPriorityPoolRatio()
Gets the fraction of the total memory to be used for high priority blocks like indexes,
dictionaries, etc.
|
double |
getWriteBufferRatio()
Gets the fraction of the total memory to be used for write buffers.
|
boolean |
isUsingFixedMemoryPerSlot()
Gets whether the state backend is configured to use a fixed amount of memory shared between
all RocksDB instances (in all tasks and operators) of a slot.
|
boolean |
isUsingManagedMemory()
Gets whether the state backend is configured to use the managed memory of a slot for RocksDB.
|
Boolean |
isUsingPartitionedIndexFilters()
Gets whether the state backend is configured to use partitioned index/filters for RocksDB.
|
void |
setFixedMemoryPerSlot(MemorySize fixedMemoryPerSlot)
Configures RocksDB to use a fixed amount of memory shared between all instances (operators)
in a slot.
|
void |
setFixedMemoryPerSlot(String totalMemoryPerSlotStr)
Configures RocksDB to use a fixed amount of memory shared between all instances (operators)
in a slot.
|
void |
setHighPriorityPoolRatio(double highPriorityPoolRatio)
Sets the fraction of the total memory to be used for high priority blocks like indexes,
dictionaries, etc.
|
void |
setUseManagedMemory(boolean useManagedMemory)
Configures RocksDB to use the managed memory of a slot.
|
void |
setWriteBufferRatio(double writeBufferRatio)
Sets the fraction of the total memory to be used for write buffers.
|
void |
validate()
Validates if the configured options are valid with respect to one another.
|
public void setUseManagedMemory(boolean useManagedMemory)
RocksDBOptions.USE_MANAGED_MEMORY
for details.public void setFixedMemoryPerSlot(MemorySize fixedMemoryPerSlot)
RocksDBOptions.FIX_PER_SLOT_MEMORY_SIZE
for details.public void setFixedMemoryPerSlot(String totalMemoryPerSlotStr)
setFixedMemoryPerSlot(MemorySize)
for details.public void setWriteBufferRatio(double writeBufferRatio)
setUseManagedMemory(boolean)
or setFixedMemoryPerSlot(MemorySize)
are set.
See RocksDBOptions.WRITE_BUFFER_RATIO
for details.
public void setHighPriorityPoolRatio(double highPriorityPoolRatio)
setUseManagedMemory(boolean)
or
setFixedMemoryPerSlot(MemorySize)
are set.
See RocksDBOptions.HIGH_PRIORITY_POOL_RATIO
for details.
public boolean isUsingManagedMemory()
RocksDBOptions.USE_MANAGED_MEMORY
for details.public boolean isUsingFixedMemoryPerSlot()
RocksDBOptions.FIX_PER_SLOT_MEMORY_SIZE
for details.@Nullable public MemorySize getFixedMemoryPerSlot()
RocksDBOptions.USE_MANAGED_MEMORY
for details.public double getWriteBufferRatio()
setUseManagedMemory(boolean)
or setFixedMemoryPerSlot(MemorySize)
are set.
See RocksDBOptions.WRITE_BUFFER_RATIO
for details.
public double getHighPriorityPoolRatio()
setUseManagedMemory(boolean)
or
setFixedMemoryPerSlot(MemorySize)
are set.
See RocksDBOptions.HIGH_PRIORITY_POOL_RATIO
for details.
public Boolean isUsingPartitionedIndexFilters()
See RocksDBOptions.USE_PARTITIONED_INDEX_FILTERS
for details.
public void validate()
public static RocksDBMemoryConfiguration fromOtherAndConfiguration(RocksDBMemoryConfiguration other, ReadableConfig config)
public static RocksDBMemoryConfiguration fromConfiguration(Configuration configuration)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.