Class RocksDBUtils
java.lang.Object
com.linkedin.venice.store.rocksdb.RocksDBUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleWith 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanupBothPartitionDirAndTempTransferredDir(String storeName, int versionNumber, int partitionId, String basePath) Cleans up both the partition directory and the temporary transferred directory for a given store, version, and partition.static StringcomposePartitionDbDir(String dbDir, String topicName, int partitionId) static StringcomposeSnapshotDir(String composePartitionDbDir) static StringcomposeSnapshotDir(String dbDir, String topicName, int partitionId) static StringcomposeStoreDbDir(String dbDir, String storeName) static StringcomposeTempPartitionDir(String dbDir, String topicName, int partitionId) static StringcomposeTempRMDSSTFileDir(String dbDir, String topicName, int partitionId) static StringcomposeTempRMDSSTFileName(int fileNo) static StringcomposeTempSSTFileDir(String dbDir, String topicName, int partitionId) static StringcomposeTempSSTFileName(int fileNo) static voiddeleteDirectory(String directoryPathStr) Deletes the files associated with the specified partition directory.static intextractTempRMDSSTFileNo(String fileName) static intextractTempSSTFileNo(String fileName) static StringgetPartitionDbName(String storeName, int partitionId) static booleanisTempPartitionDir(String partitionDir) static booleanisTempRMDSSTFile(String fileName) static booleanisTempSSTFile(String fileName) static intparsePartitionIdFromPartitionDbName(String partitionDbName) static StringparseStoreNameFromPartitionDbName(String partitionDbName) static voidrenameTempTransferredPartitionDirToPartitionDir(String dbDir, String topicName, int partitionId) Rename the temporary transferred partition directory to the final partition directory.
-
Field Details
-
ROCKSDB_OVERHEAD_RATIO_FOR_HYBRID_STORE
public static final double ROCKSDB_OVERHEAD_RATIO_FOR_HYBRID_STOREWith 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:
-
-
Constructor Details
-
RocksDBUtils
public RocksDBUtils()
-
-
Method Details
-
getPartitionDbName
-
parseStoreNameFromPartitionDbName
-
parsePartitionIdFromPartitionDbName
-
composeStoreDbDir
-
composePartitionDbDir
-
composeTempPartitionDir
-
isTempPartitionDir
-
composeSnapshotDir
-
composeSnapshotDir
-
composeTempSSTFileDir
-
composeTempRMDSSTFileDir
-
composeTempSSTFileName
-
composeTempRMDSSTFileName
-
isTempSSTFile
-
isTempRMDSSTFile
-
extractTempSSTFileNo
-
extractTempRMDSSTFileNo
-
deleteDirectory
Deletes the files associated with the specified partition directory. -
renameTempTransferredPartitionDirToPartitionDir
public static void renameTempTransferredPartitionDirToPartitionDir(String dbDir, String topicName, int partitionId) Rename the temporary transferred partition directory to the final partition directory. example of temp partition dir: /db/directory/myStore_v3/temp_transferred_myStore_v3_3/ example of final partition dir: /db/directory/myStore_v3/myStore_v3_3/- Parameters:
dbDir- the base directory where the partition directories are locatedtopicName- the topic namepartitionId- the partition id
-
cleanupBothPartitionDirAndTempTransferredDir
public static void cleanupBothPartitionDirAndTempTransferredDir(String storeName, int versionNumber, int partitionId, String basePath) Cleans up both the partition directory and the temporary transferred directory for a given store, version, and partition. temp directory example: /db/directory/myStore_v3/temp_transferred_myStore_v3_3/ partition directory example: /db/directory/myStore_v3/myStore_v3_3/- Parameters:
storeName-versionNumber-partitionId-basePath-
-