Class RocksDBStorageEngineFactory
java.lang.Object
com.linkedin.davinci.store.StorageEngineFactory
com.linkedin.davinci.store.rocksdb.RocksDBStorageEngineFactory
-
Constructor Summary
ConstructorsConstructorDescriptionRocksDBStorageEngineFactory(VeniceServerConfig serverConfig) RocksDBStorageEngineFactory(VeniceServerConfig serverConfig, RocksDBMemoryStats rocksDBMemoryStats, InternalAvroSpecificSerializer<StoreVersionState> storeVersionStateSerializer, InternalAvroSpecificSerializer<PartitionState> partitionStateSerializer) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the storage configurationvoidcloseStorageEngine(StorageEngine engine) Close the storage engine from the underlying storage configurationOptional<org.rocksdb.Statistics>org.rocksdb.EnvgetEnv()longRetrieve all the stores persisted previouslyReturn the persistence type current factory supports.org.rocksdb.RateLimitergetRocksDBPath(String storeName, int partitionId) org.rocksdb.CachegetSharedCache(boolean isRMD) org.rocksdb.SstFileManagergetStorageEngine(VeniceStoreVersionConfig storeConfig) Get an initialized storage implementationgetStorageEngine(VeniceStoreVersionConfig storeConfig, boolean replicationMetadataEnabled) Replication metadata is only supported in RocksDB storage engine.org.rocksdb.WriteBufferManagervoidremoveStorageEngine(StorageEngine engine) Remove the storage engine from the underlying storage configurationvoidremoveStorageEngine(String storeName) Currently, this function doesn't apply any IO throttling and if there is a side effect discovered in the read path in the future, we will need to apply some optimization here.voidremoveStorageEnginePartition(String storeName, int partitionId) Methods inherited from class com.linkedin.davinci.store.StorageEngineFactory
verifyPersistenceType, verifyPersistenceType
-
Constructor Details
-
RocksDBStorageEngineFactory
-
RocksDBStorageEngineFactory
public RocksDBStorageEngineFactory(VeniceServerConfig serverConfig, RocksDBMemoryStats rocksDBMemoryStats, InternalAvroSpecificSerializer<StoreVersionState> storeVersionStateSerializer, InternalAvroSpecificSerializer<PartitionState> partitionStateSerializer)
-
-
Method Details
-
getMemtableSize
public long getMemtableSize() -
getAggStatistics
-
getWriteBufferManager
public org.rocksdb.WriteBufferManager getWriteBufferManager() -
getRateLimiter
public org.rocksdb.RateLimiter getRateLimiter() -
getSstFileManager
public org.rocksdb.SstFileManager getSstFileManager() -
getEnv
public org.rocksdb.Env getEnv() -
getStorageEngine
public StorageEngine getStorageEngine(VeniceStoreVersionConfig storeConfig) throws StorageInitializationException Description copied from class:StorageEngineFactoryGet an initialized storage implementation- Specified by:
getStorageEnginein classStorageEngineFactory- Parameters:
storeConfig- store definition- Returns:
- The storage engine
- Throws:
StorageInitializationException
-
getStorageEngine
public StorageEngine getStorageEngine(VeniceStoreVersionConfig storeConfig, boolean replicationMetadataEnabled) throws StorageInitializationException Description copied from class:StorageEngineFactoryReplication metadata is only supported in RocksDB storage engine. For other type of the storage engine, we will throw VeniceException here.- Overrides:
getStorageEnginein classStorageEngineFactory- Throws:
StorageInitializationException
-
getPersistedStoreNames
Description copied from class:StorageEngineFactoryRetrieve all the stores persisted previously- Specified by:
getPersistedStoreNamesin classStorageEngineFactory- Returns:
- All the store names
-
close
public void close()Description copied from class:StorageEngineFactoryClose the storage configuration- Specified by:
closein classStorageEngineFactory
-
removeStorageEngine
Description copied from class:StorageEngineFactoryRemove the storage engine from the underlying storage configuration- Specified by:
removeStorageEnginein classStorageEngineFactory- Parameters:
engine- Specifies the storage engine to be removed
-
removeStorageEngine
Currently, this function doesn't apply any IO throttling and if there is a side effect discovered in the read path in the future, we will need to apply some optimization here.- Specified by:
removeStorageEnginein classStorageEngineFactory
-
getRocksDBPath
-
removeStorageEnginePartition
- Specified by:
removeStorageEnginePartitionin classStorageEngineFactory
-
closeStorageEngine
Description copied from class:StorageEngineFactoryClose the storage engine from the underlying storage configuration- Specified by:
closeStorageEnginein classStorageEngineFactory- Parameters:
engine- Specifies the storage engine to be removed
-
getPersistenceType
Description copied from class:StorageEngineFactoryReturn the persistence type current factory supports.- Specified by:
getPersistenceTypein classStorageEngineFactory- Returns:
-