Package org.rocksdb

Class MemoryUtil


  • public class MemoryUtil
    extends java.lang.Object
    JNI passthrough for MemoryUtil.
    • Constructor Summary

      Constructors 
      Constructor Description
      MemoryUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<MemoryUsageType,​java.lang.Long> getApproximateMemoryUsageByType​(java.util.List<RocksDB> dbs, java.util.Set<Cache> caches)
      Returns the approximate memory usage of different types in the input list of DBs and Cache set.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MemoryUtil

        public MemoryUtil()
    • Method Detail

      • getApproximateMemoryUsageByType

        public static java.util.Map<MemoryUsageType,​java.lang.Long> getApproximateMemoryUsageByType​(java.util.List<RocksDB> dbs,
                                                                                                          java.util.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.