Package org.rocksdb

Class MemoryUtil

java.lang.Object
org.rocksdb.MemoryUtil

public class MemoryUtil extends Object
JNI passthrough for MemoryUtil.
  • Constructor Details

    • MemoryUtil

      public MemoryUtil()
  • Method Details

    • getApproximateMemoryUsageByType

      public static Map<MemoryUsageType,Long> getApproximateMemoryUsageByType(List<RocksDB> dbs, Set<Cache> caches)

      Returns the approximate memory usage of different types in the input list of DBs and Cache set. For instance, in the output map the key kMemTableTotal will be associated with the memory usage of all the mem-tables from all the input rocksdb instances.

      Note that for memory usage inside Cache class, we will only report the usage of the input "cache_set" without including those Cache usage inside the input list "dbs" of DBs.

      Parameters:
      dbs - List of dbs to collect memory usage for.
      caches - Set of caches to collect memory usage for.
      Returns:
      Map from MemoryUsageType to memory usage as a Long.