Class StorageVolumeFactory
java.lang.Object
org.apache.hadoop.ozone.container.common.volume.StorageVolumeFactory
- Direct Known Subclasses:
DbVolumeFactory,HddsVolumeFactory,MetadataVolumeFactory
A factory class for StorageVolume.
-
Constructor Summary
ConstructorsConstructorDescriptionStorageVolumeFactory(org.apache.hadoop.hdds.conf.ConfigurationSource conf, org.apache.hadoop.hdds.fs.SpaceUsageCheckFactory usageCheckFactory, MutableVolumeSet volumeSet, String datanodeUuid, String clusterID) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckAndSetClusterID(String idFromVersionFile) If Version file exists and theclusterIDis not set yet, assign it the value from Version file.org.apache.hadoop.hdds.conf.ConfigurationSourcegetConf()org.apache.hadoop.hdds.fs.SpaceUsageCheckFactory
-
Constructor Details
-
StorageVolumeFactory
public StorageVolumeFactory(org.apache.hadoop.hdds.conf.ConfigurationSource conf, org.apache.hadoop.hdds.fs.SpaceUsageCheckFactory usageCheckFactory, MutableVolumeSet volumeSet, String datanodeUuid, String clusterID)
-
-
Method Details
-
getConf
public org.apache.hadoop.hdds.conf.ConfigurationSource getConf() -
getUsageCheckFactory
public org.apache.hadoop.hdds.fs.SpaceUsageCheckFactory getUsageCheckFactory() -
getVolumeSet
-
getDatanodeUuid
-
getClusterID
-
checkAndSetClusterID
protected void checkAndSetClusterID(String idFromVersionFile) throws org.apache.hadoop.ozone.common.InconsistentStorageStateException If Version file exists and theclusterIDis not set yet, assign it the value from Version file. Otherwise, check that the given id matches with the id from version file.- Parameters:
idFromVersionFile- value of the property from Version file- Throws:
org.apache.hadoop.ozone.common.InconsistentStorageStateException
-