Class StorageVolumeFactory

java.lang.Object
org.apache.hadoop.ozone.container.common.volume.StorageVolumeFactory
Direct Known Subclasses:
DbVolumeFactory, HddsVolumeFactory, MetadataVolumeFactory

public abstract class StorageVolumeFactory extends Object
A factory class for StorageVolume.
  • 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

      public VolumeSet getVolumeSet()
    • getDatanodeUuid

      public String getDatanodeUuid()
    • getClusterID

      public String getClusterID()
    • checkAndSetClusterID

      protected void checkAndSetClusterID(String idFromVersionFile) throws org.apache.hadoop.ozone.common.InconsistentStorageStateException
      If Version file exists and the clusterID is 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