Class HddsVolumeUtil
java.lang.Object
org.apache.hadoop.ozone.container.common.utils.HddsVolumeUtil
A util class for
HddsVolume.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetHddsRoot(String volumeRoot) Get hddsRoot from volume root.static voidinitPerDiskDBStore(String containerDBPath, org.apache.hadoop.hdds.conf.ConfigurationSource conf, boolean readOnly) Initialize db instance, rocksdb will load the existing instance if present and format a new one if not.static voidloadAllHddsVolumeDbStore(MutableVolumeSet hddsVolumeSet, MutableVolumeSet dbVolumeSet, boolean readOnly, org.slf4j.Logger logger) Load already formatted db instances for all HddsVolumes.
-
Method Details
-
getHddsRoot
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-
-