Class HddsVolumeUtil

java.lang.Object
org.apache.hadoop.ozone.container.common.utils.HddsVolumeUtil

public final class HddsVolumeUtil extends Object
A util class for HddsVolume.
  • Method Details

    • getHddsRoot

      public static String getHddsRoot(String volumeRoot)
      Get hddsRoot from volume root. If volumeRoot points to hddsRoot, it is returned as is. For a volumeRoot /data/disk1, the hddsRoot is /data/disk1/hdds.
      Parameters:
      volumeRoot - root of the volume.
      Returns:
      hddsRoot of the volume.
    • initPerDiskDBStore

      public static void initPerDiskDBStore(String containerDBPath, org.apache.hadoop.hdds.conf.ConfigurationSource conf, boolean readOnly) throws IOException
      Initialize db instance, rocksdb will load the existing instance if present and format a new one if not.
      Parameters:
      containerDBPath -
      conf -
      Throws:
      IOException
    • loadAllHddsVolumeDbStore

      public static void loadAllHddsVolumeDbStore(MutableVolumeSet hddsVolumeSet, MutableVolumeSet dbVolumeSet, boolean readOnly, org.slf4j.Logger logger)
      Load already formatted db instances for all HddsVolumes.
      Parameters:
      hddsVolumeSet -
      dbVolumeSet -
      logger -