public final class RocksDBMemoryConfiguration extends Object implements Serializable
| Constructor and Description |
|---|
RocksDBMemoryConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
static RocksDBMemoryConfiguration |
fromOtherAndConfiguration(RocksDBMemoryConfiguration other,
org.apache.flink.configuration.ReadableConfig config)
Derives a RocksDBMemoryConfiguration from another object and a configuration.
|
org.apache.flink.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.
|
void |
setFixedMemoryPerSlot(org.apache.flink.configuration.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(org.apache.flink.configuration.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.USE_MANAGED_MEMORY for details.@Nullable public org.apache.flink.configuration.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 void validate()
public static RocksDBMemoryConfiguration fromOtherAndConfiguration(RocksDBMemoryConfiguration other, org.apache.flink.configuration.ReadableConfig config)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.