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 TypeMethodDescriptionvoid
close()
Close the storage configurationvoid
Close the storage engine from the underlying storage configurationboolean
enforceMemoryLimit
(String storeNameWithoutVersionSuffix) Whether memory limiter applies or not.Optional<org.rocksdb.Statistics>
org.rocksdb.Env
getEnv()
long
long
Retrieve all the stores persisted previouslyReturn the persistence type current factory supports.org.rocksdb.RateLimiter
getRocksDBPath
(String storeName, int partitionId) org.rocksdb.Cache
getSharedCache
(boolean isRMD) org.rocksdb.SstFileManager
org.rocksdb.SstFileManager
getStorageEngine
(VeniceStoreVersionConfig storeConfig) Get an initialized storage implementationgetStorageEngine
(VeniceStoreVersionConfig storeConfig, boolean replicationMetadataEnabled) Replication metadata is only supported in RocksDB storage engine.org.rocksdb.WriteBufferManager
void
Remove the storage engine from the underlying storage configurationvoid
removeStorageEngine
(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.void
removeStorageEnginePartition
(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
-
getMemoryLimit
public long getMemoryLimit() -
getMemtableSize
public long getMemtableSize() -
getAggStatistics
-
getWriteBufferManager
public org.rocksdb.WriteBufferManager getWriteBufferManager() -
getRateLimiter
public org.rocksdb.RateLimiter getRateLimiter() -
getSstFileManager
public org.rocksdb.SstFileManager getSstFileManager() -
getSstFileManagerForMemoryLimiter
public org.rocksdb.SstFileManager getSstFileManagerForMemoryLimiter() -
enforceMemoryLimit
Whether memory limiter applies or not. -
getEnv
public org.rocksdb.Env getEnv() -
getStorageEngine
public AbstractStorageEngine getStorageEngine(VeniceStoreVersionConfig storeConfig) throws StorageInitializationException Description copied from class:StorageEngineFactory
Get an initialized storage implementation- Specified by:
getStorageEngine
in classStorageEngineFactory
- Parameters:
storeConfig
- store definition- Returns:
- The storage engine
- Throws:
StorageInitializationException
-
getStorageEngine
public AbstractStorageEngine getStorageEngine(VeniceStoreVersionConfig storeConfig, boolean replicationMetadataEnabled) throws StorageInitializationException Description copied from class:StorageEngineFactory
Replication metadata is only supported in RocksDB storage engine. For other type of the storage engine, we will throw VeniceException here.- Overrides:
getStorageEngine
in classStorageEngineFactory
- Throws:
StorageInitializationException
-
getPersistedStoreNames
Description copied from class:StorageEngineFactory
Retrieve all the stores persisted previously- Specified by:
getPersistedStoreNames
in classStorageEngineFactory
- Returns:
- All the store names
-
close
public void close()Description copied from class:StorageEngineFactory
Close the storage configuration- Specified by:
close
in classStorageEngineFactory
-
removeStorageEngine
Description copied from class:StorageEngineFactory
Remove the storage engine from the underlying storage configuration- Specified by:
removeStorageEngine
in 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:
removeStorageEngine
in classStorageEngineFactory
-
getRocksDBPath
-
removeStorageEnginePartition
- Specified by:
removeStorageEnginePartition
in classStorageEngineFactory
-
closeStorageEngine
Description copied from class:StorageEngineFactory
Close the storage engine from the underlying storage configuration- Specified by:
closeStorageEngine
in classStorageEngineFactory
- Parameters:
engine
- Specifies the storage engine to be removed
-
getPersistenceType
Description copied from class:StorageEngineFactory
Return the persistence type current factory supports.- Specified by:
getPersistenceType
in classStorageEngineFactory
- Returns:
-