Class RocksDBUtils
- java.lang.Object
-
- com.linkedin.venice.store.rocksdb.RocksDBUtils
-
public class RocksDBUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static double
ROCKSDB_OVERHEAD_RATIO_FOR_HYBRID_STORE
With level_compaction_dynamic_level_bytes to be false, the stable LSM structure is not guaranteed, so the maximum overhead could be around 2.111 for hybrid stores.
-
Constructor Summary
Constructors Constructor Description RocksDBUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
composePartitionDbDir(java.lang.String dbDir, java.lang.String topicName, int partitionId)
static java.lang.String
composeSnapshotDir(java.lang.String composePartitionDbDir)
static java.lang.String
composeSnapshotDir(java.lang.String dbDir, java.lang.String topicName, int partitionId)
static java.lang.String
composeStoreDbDir(java.lang.String dbDir, java.lang.String storeName)
static java.lang.String
composeTempRMDSSTFileDir(java.lang.String dbDir, java.lang.String topicName, int partitionId)
static java.lang.String
composeTempRMDSSTFileName(int fileNo)
static java.lang.String
composeTempSSTFileDir(java.lang.String dbDir, java.lang.String topicName, int partitionId)
static java.lang.String
composeTempSSTFileName(int fileNo)
static void
deletePartitionDir(java.lang.String baseDir, java.lang.String storeName, int version, int partition)
Deletes the files associated with the specified store, version, and partition.static int
extractTempRMDSSTFileNo(java.lang.String fileName)
static int
extractTempSSTFileNo(java.lang.String fileName)
static java.lang.String
getPartitionDbName(java.lang.String storeName, int partitionId)
static boolean
isTempRMDSSTFile(java.lang.String fileName)
static boolean
isTempSSTFile(java.lang.String fileName)
static int
parsePartitionIdFromPartitionDbName(java.lang.String partitionDbName)
static java.lang.String
parseStoreNameFromPartitionDbName(java.lang.String partitionDbName)
-
-
-
Field Detail
-
ROCKSDB_OVERHEAD_RATIO_FOR_HYBRID_STORE
public static final double ROCKSDB_OVERHEAD_RATIO_FOR_HYBRID_STORE
With level_compaction_dynamic_level_bytes to be false, the stable LSM structure is not guaranteed, so the maximum overhead could be around 2.111 for hybrid stores. Check https://github.com/facebook/rocksdb/wiki/Leveled-Compaction- See Also:
- Constant Field Values
-
-
Method Detail
-
getPartitionDbName
public static java.lang.String getPartitionDbName(java.lang.String storeName, int partitionId)
-
parseStoreNameFromPartitionDbName
public static java.lang.String parseStoreNameFromPartitionDbName(java.lang.String partitionDbName)
-
parsePartitionIdFromPartitionDbName
public static int parsePartitionIdFromPartitionDbName(java.lang.String partitionDbName)
-
composeStoreDbDir
public static java.lang.String composeStoreDbDir(java.lang.String dbDir, java.lang.String storeName)
-
composePartitionDbDir
public static java.lang.String composePartitionDbDir(java.lang.String dbDir, java.lang.String topicName, int partitionId)
-
composeSnapshotDir
public static java.lang.String composeSnapshotDir(java.lang.String dbDir, java.lang.String topicName, int partitionId)
-
composeSnapshotDir
public static java.lang.String composeSnapshotDir(java.lang.String composePartitionDbDir)
-
composeTempSSTFileDir
public static java.lang.String composeTempSSTFileDir(java.lang.String dbDir, java.lang.String topicName, int partitionId)
-
composeTempRMDSSTFileDir
public static java.lang.String composeTempRMDSSTFileDir(java.lang.String dbDir, java.lang.String topicName, int partitionId)
-
composeTempSSTFileName
public static java.lang.String composeTempSSTFileName(int fileNo)
-
composeTempRMDSSTFileName
public static java.lang.String composeTempRMDSSTFileName(int fileNo)
-
isTempSSTFile
public static boolean isTempSSTFile(java.lang.String fileName)
-
isTempRMDSSTFile
public static boolean isTempRMDSSTFile(java.lang.String fileName)
-
extractTempSSTFileNo
public static int extractTempSSTFileNo(java.lang.String fileName)
-
extractTempRMDSSTFileNo
public static int extractTempRMDSSTFileNo(java.lang.String fileName)
-
deletePartitionDir
public static void deletePartitionDir(java.lang.String baseDir, java.lang.String storeName, int version, int partition)
Deletes the files associated with the specified store, version, and partition.- Parameters:
storeName
- the name of the storeversion
- the version number of the storepartition
- the partition ID
-
-