Package org.apache.flink.state.rocksdb
Class RocksDBMemoryConfiguration
java.lang.Object
org.apache.flink.state.rocksdb.RocksDBMemoryConfiguration
- All Implemented Interfaces:
Serializable
The settings regarding RocksDBs memory usage.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RocksDBMemoryConfigurationfromConfiguration(org.apache.flink.configuration.Configuration configuration) static RocksDBMemoryConfigurationfromOtherAndConfiguration(RocksDBMemoryConfiguration other, org.apache.flink.configuration.ReadableConfig config) Derives a RocksDBMemoryConfiguration from another object and a configuration.org.apache.flink.configuration.MemorySizeGets the fixed amount of memory to be shared between all RocksDB instances (in all tasks and operators) of a slot.doubleGets the fraction of the total memory to be used for high priority blocks like indexes, dictionaries, etc.doubleGets the fraction of the total memory to be used for write buffers.booleanGets 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.booleanGets whether the state backend is configured to use the managed memory of a slot for RocksDB.Gets whether the state backend is configured to use partitioned index/filters for RocksDB.voidsetFixedMemoryPerSlot(String totalMemoryPerSlotStr) Configures RocksDB to use a fixed amount of memory shared between all instances (operators) in a slot.voidsetFixedMemoryPerSlot(org.apache.flink.configuration.MemorySize fixedMemoryPerSlot) Configures RocksDB to use a fixed amount of memory shared between all instances (operators) in a slot.voidsetHighPriorityPoolRatio(double highPriorityPoolRatio) Sets the fraction of the total memory to be used for high priority blocks like indexes, dictionaries, etc.voidsetUseManagedMemory(boolean useManagedMemory) Configures RocksDB to use the managed memory of a slot.voidsetWriteBufferRatio(double writeBufferRatio) Sets the fraction of the total memory to be used for write buffers.voidvalidate()Validates if the configured options are valid with respect to one another.
-
Constructor Details
-
RocksDBMemoryConfiguration
public RocksDBMemoryConfiguration()
-
-
Method Details
-
setUseManagedMemory
public void setUseManagedMemory(boolean useManagedMemory) Configures RocksDB to use the managed memory of a slot. SeeRocksDBOptions.USE_MANAGED_MEMORYfor details. -
setFixedMemoryPerSlot
public 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. SeeRocksDBOptions.FIX_PER_SLOT_MEMORY_SIZEfor details. -
setFixedMemoryPerSlot
Configures RocksDB to use a fixed amount of memory shared between all instances (operators) in a slot. SeesetFixedMemoryPerSlot(MemorySize)for details. -
setWriteBufferRatio
public void setWriteBufferRatio(double writeBufferRatio) Sets the fraction of the total memory to be used for write buffers. This only has an effect is eithersetUseManagedMemory(boolean)orsetFixedMemoryPerSlot(MemorySize)are set.See
RocksDBOptions.WRITE_BUFFER_RATIOfor details. -
setHighPriorityPoolRatio
public void setHighPriorityPoolRatio(double highPriorityPoolRatio) Sets the fraction of the total memory to be used for high priority blocks like indexes, dictionaries, etc. This only has an effect is eithersetUseManagedMemory(boolean)orsetFixedMemoryPerSlot(MemorySize)are set.See
RocksDBOptions.HIGH_PRIORITY_POOL_RATIOfor details. -
isUsingManagedMemory
public boolean isUsingManagedMemory()Gets whether the state backend is configured to use the managed memory of a slot for RocksDB. SeeRocksDBOptions.USE_MANAGED_MEMORYfor details. -
isUsingFixedMemoryPerSlot
public 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. SeeRocksDBOptions.FIX_PER_SLOT_MEMORY_SIZEfor details. -
getFixedMemoryPerSlot
@Nullable public 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. Null is not configured. SeeRocksDBOptions.USE_MANAGED_MEMORYfor details. -
getWriteBufferRatio
public double getWriteBufferRatio()Gets the fraction of the total memory to be used for write buffers. This only has an effect is eithersetUseManagedMemory(boolean)orsetFixedMemoryPerSlot(MemorySize)are set.See
RocksDBOptions.WRITE_BUFFER_RATIOfor details. -
getHighPriorityPoolRatio
public double getHighPriorityPoolRatio()Gets the fraction of the total memory to be used for high priority blocks like indexes, dictionaries, etc. This only has an effect is eithersetUseManagedMemory(boolean)orsetFixedMemoryPerSlot(MemorySize)are set.See
RocksDBOptions.HIGH_PRIORITY_POOL_RATIOfor details. -
isUsingPartitionedIndexFilters
Gets whether the state backend is configured to use partitioned index/filters for RocksDB.See
RocksDBOptions.USE_PARTITIONED_INDEX_FILTERSfor details. -
validate
public void validate()Validates if the configured options are valid with respect to one another. -
fromOtherAndConfiguration
public static RocksDBMemoryConfiguration fromOtherAndConfiguration(RocksDBMemoryConfiguration other, org.apache.flink.configuration.ReadableConfig config) Derives a RocksDBMemoryConfiguration from another object and a configuration. The values set on the other object take precedence, and the values from the configuration are used if no values are set on the other config object. -
fromConfiguration
public static RocksDBMemoryConfiguration fromConfiguration(org.apache.flink.configuration.Configuration configuration)
-