public class RocksDBMemoryControllerUtils extends Object
Cache and WriteBufferManager which are used to control total
memory usage of RocksDB.| Modifier and Type | Class and Description |
|---|---|
static interface |
RocksDBMemoryControllerUtils.RocksDBMemoryFactory
Factory for Write Buffer Manager and Bock Cache.
|
| Constructor and Description |
|---|
RocksDBMemoryControllerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.flink.contrib.streaming.state.RocksDBSharedResources |
allocateRocksDBSharedResources(long totalMemorySize,
double writeBufferRatio,
double highPriorityPoolRatio,
boolean usingPartitionedIndexFilters,
RocksDBMemoryControllerUtils.RocksDBMemoryFactory factory)
Allocate memory controllable RocksDB shared resources.
|
static long |
calculateActualCacheCapacity(long totalMemorySize,
double writeBufferRatio)
Calculate the actual memory capacity of cache, which would be shared among rocksDB
instance(s).
|
public static org.apache.flink.contrib.streaming.state.RocksDBSharedResources allocateRocksDBSharedResources(long totalMemorySize,
double writeBufferRatio,
double highPriorityPoolRatio,
boolean usingPartitionedIndexFilters,
RocksDBMemoryControllerUtils.RocksDBMemoryFactory factory)
totalMemorySize - The total memory limit size.writeBufferRatio - The ratio of total memory which is occupied by write buffer manager.highPriorityPoolRatio - The high priority pool ratio of cache.factory - creates Write Buffer Manager and Bock Cache@VisibleForTesting
public static long calculateActualCacheCapacity(long totalMemorySize,
double writeBufferRatio)
totalMemorySize - Total off-heap memory size reserved for RocksDB instance(s).writeBufferRatio - The ratio of total memory size which would be reserved for write
buffer manager and its over-capacity part.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.