Package org.apache.flink.state.forst
Class ForStMemoryConfiguration
- java.lang.Object
-
- org.apache.flink.state.forst.ForStMemoryConfiguration
-
- All Implemented Interfaces:
Serializable
public final class ForStMemoryConfiguration extends Object implements Serializable
The settings regarding ForSt memory usage.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ForStMemoryConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ForStMemoryConfiguration
fromConfiguration(Configuration configuration)
static ForStMemoryConfiguration
fromOtherAndConfiguration(ForStMemoryConfiguration other, ReadableConfig config)
Derives a ForStMemoryConfiguration 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 ForSt 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 ForSt.Boolean
isUsingPartitionedIndexFilters()
Gets whether the state backend is configured to use partitioned index/filters for ForSt.void
setFixedMemoryPerSlot(String totalMemoryPerSlotStr)
Configures ForSt to use a fixed amount of memory shared between all instances (operators) in a slot.void
setFixedMemoryPerSlot(MemorySize fixedMemoryPerSlot)
Configures ForSt 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 ForSt 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.
-
-
-
Method Detail
-
setUseManagedMemory
public void setUseManagedMemory(boolean useManagedMemory)
Configures ForSt to use the managed memory of a slot. SeeForStOptions.USE_MANAGED_MEMORY
for details.
-
setFixedMemoryPerSlot
public void setFixedMemoryPerSlot(MemorySize fixedMemoryPerSlot)
Configures ForSt to use a fixed amount of memory shared between all instances (operators) in a slot. SeeForStOptions.FIX_PER_SLOT_MEMORY_SIZE
for details.
-
setFixedMemoryPerSlot
public void setFixedMemoryPerSlot(String totalMemoryPerSlotStr)
Configures ForSt 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
ForStOptions.WRITE_BUFFER_RATIO
for 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
ForStOptions.HIGH_PRIORITY_POOL_RATIO
for details.
-
isUsingManagedMemory
public boolean isUsingManagedMemory()
Gets whether the state backend is configured to use the managed memory of a slot for ForSt. SeeForStOptions.USE_MANAGED_MEMORY
for details.
-
isUsingFixedMemoryPerSlot
public boolean isUsingFixedMemoryPerSlot()
Gets whether the state backend is configured to use a fixed amount of memory shared between all ForSt instances (in all tasks and operators) of a slot. SeeForStOptions.FIX_PER_SLOT_MEMORY_SIZE
for details.
-
getFixedMemoryPerSlot
@Nullable public 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. SeeForStOptions.USE_MANAGED_MEMORY
for 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
ForStOptions.WRITE_BUFFER_RATIO
for 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
ForStOptions.HIGH_PRIORITY_POOL_RATIO
for details.
-
isUsingPartitionedIndexFilters
public Boolean isUsingPartitionedIndexFilters()
Gets whether the state backend is configured to use partitioned index/filters for ForSt.See
ForStOptions.USE_PARTITIONED_INDEX_FILTERS
for details.
-
validate
public void validate()
Validates if the configured options are valid with respect to one another.
-
fromOtherAndConfiguration
public static ForStMemoryConfiguration fromOtherAndConfiguration(ForStMemoryConfiguration other, ReadableConfig config)
Derives a ForStMemoryConfiguration 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 ForStMemoryConfiguration fromConfiguration(Configuration configuration)
-
-