Class RocksDBUtils
java.lang.Object
com.linkedin.venice.store.rocksdb.RocksDBUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.static String
composePartitionDbDir
(String dbDir, String topicName, int partitionId) static String
composeSnapshotDir
(String composePartitionDbDir) static String
composeSnapshotDir
(String dbDir, String topicName, int partitionId) static String
composeStoreDbDir
(String dbDir, String storeName) static String
composeTempPartitionDir
(String dbDir, String topicName, int partitionId) static String
composeTempRMDSSTFileDir
(String dbDir, String topicName, int partitionId) static String
composeTempRMDSSTFileName
(int fileNo) static String
composeTempSSTFileDir
(String dbDir, String topicName, int partitionId) static String
composeTempSSTFileName
(int fileNo) static void
deleteDirectory
(String directoryPathStr) Deletes the files associated with the specified partition directory.static int
extractTempRMDSSTFileNo
(String fileName) static int
extractTempSSTFileNo
(String fileName) static String
getPartitionDbName
(String storeName, int partitionId) static boolean
isTempPartitionDir
(String partitionDir) static boolean
isTempRMDSSTFile
(String fileName) static boolean
isTempSSTFile
(String fileName) static int
parsePartitionIdFromPartitionDbName
(String partitionDbName) static String
parseStoreNameFromPartitionDbName
(String partitionDbName) static void
renameTempTransferredPartitionDirToPartitionDir
(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
-
-