Class RocksDBUtils

java.lang.Object
com.linkedin.venice.store.rocksdb.RocksDBUtils

public class RocksDBUtils extends Object
  • Field Details

    • 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:
  • Constructor Details

    • RocksDBUtils

      public RocksDBUtils()
  • Method Details

    • getPartitionDbName

      public static String getPartitionDbName(String storeName, int partitionId)
    • parseStoreNameFromPartitionDbName

      public static String parseStoreNameFromPartitionDbName(String partitionDbName)
    • parsePartitionIdFromPartitionDbName

      public static int parsePartitionIdFromPartitionDbName(String partitionDbName)
    • composeStoreDbDir

      public static String composeStoreDbDir(String dbDir, String storeName)
    • composePartitionDbDir

      public static String composePartitionDbDir(String dbDir, String topicName, int partitionId)
    • composeSnapshotDir

      public static String composeSnapshotDir(String dbDir, String topicName, int partitionId)
    • composeSnapshotDir

      public static String composeSnapshotDir(String composePartitionDbDir)
    • composeTempSSTFileDir

      public static String composeTempSSTFileDir(String dbDir, String topicName, int partitionId)
    • composeTempRMDSSTFileDir

      public static String composeTempRMDSSTFileDir(String dbDir, String topicName, int partitionId)
    • composeTempSSTFileName

      public static String composeTempSSTFileName(int fileNo)
    • composeTempRMDSSTFileName

      public static String composeTempRMDSSTFileName(int fileNo)
    • isTempSSTFile

      public static boolean isTempSSTFile(String fileName)
    • isTempRMDSSTFile

      public static boolean isTempRMDSSTFile(String fileName)
    • extractTempSSTFileNo

      public static int extractTempSSTFileNo(String fileName)
    • extractTempRMDSSTFileNo

      public static int extractTempRMDSSTFileNo(String fileName)
    • deletePartitionDir

      public static void deletePartitionDir(String baseDir, String storeName, int version, int partition)
      Deletes the files associated with the specified store, version, and partition.
      Parameters:
      storeName - the name of the store
      version - the version number of the store
      partition - the partition ID