Class RocksDBThrottler

java.lang.Object
com.linkedin.davinci.store.rocksdb.RocksDBThrottler

public class RocksDBThrottler extends Object
This class is used to throttle RocksDB operations. So far, it only supports throttling open operations. check RocksDBServerConfig.ROCKSDB_DB_OPEN_OPERATION_THROTTLE to find more details.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static interface 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RocksDBThrottler(int allowedMaxOpenOperationsInParallel)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.rocksdb.RocksDB
    open(org.rocksdb.Options options, String dbPath, List<org.rocksdb.ColumnFamilyDescriptor> columnFamilyDescriptors, List<org.rocksdb.ColumnFamilyHandle> columnFamilyHandles)
    Open RocksDB in read-write mode with provided column family descriptors and handlers.
    org.rocksdb.RocksDB
    openReadOnly(org.rocksdb.Options options, String dbPath, List<org.rocksdb.ColumnFamilyDescriptor> columnFamilyDescriptors, List<org.rocksdb.ColumnFamilyHandle> columnFamilyHandles)
    Open RocksDB in read-only mode with provided column family descriptors and handlers.
    protected org.rocksdb.RocksDB
     

    Methods inherited from class java.lang.Object

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

    • RocksDBThrottler

      public RocksDBThrottler(int allowedMaxOpenOperationsInParallel)
  • Method Details

    • throttledOpen

      protected org.rocksdb.RocksDB throttledOpen(String dbPath, RocksDBThrottler.RocksDBSupplier rocksDBSupplier) throws InterruptedException, org.rocksdb.RocksDBException
      Throws:
      InterruptedException
      org.rocksdb.RocksDBException
    • openReadOnly

      public org.rocksdb.RocksDB openReadOnly(org.rocksdb.Options options, String dbPath, List<org.rocksdb.ColumnFamilyDescriptor> columnFamilyDescriptors, List<org.rocksdb.ColumnFamilyHandle> columnFamilyHandles) throws org.rocksdb.RocksDBException, InterruptedException
      Open RocksDB in read-only mode with provided column family descriptors and handlers.
      Throws:
      org.rocksdb.RocksDBException
      InterruptedException
    • open

      public org.rocksdb.RocksDB open(org.rocksdb.Options options, String dbPath, List<org.rocksdb.ColumnFamilyDescriptor> columnFamilyDescriptors, List<org.rocksdb.ColumnFamilyHandle> columnFamilyHandles) throws org.rocksdb.RocksDBException, InterruptedException
      Open RocksDB in read-write mode with provided column family descriptors and handlers.
      Throws:
      org.rocksdb.RocksDBException
      InterruptedException