Class StorageLocationReport.Builder

java.lang.Object
org.apache.hadoop.ozone.container.common.impl.StorageLocationReport.Builder
Enclosing class:
StorageLocationReport

public static class StorageLocationReport.Builder extends Object
Builder class for building StorageLocationReport.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setId

      public StorageLocationReport.Builder setId(String idValue)
      Sets the storageId.
      Parameters:
      idValue - storageId
      Returns:
      StorageLocationReport.Builder
    • setFailed

      public StorageLocationReport.Builder setFailed(boolean failedValue)
      Sets whether the volume failed or not.
      Parameters:
      failedValue - whether volume failed or not
      Returns:
      StorageLocationReport.Builder
    • isFailed

      public boolean isFailed()
    • setCapacity

      public StorageLocationReport.Builder setCapacity(long capacityValue)
      Sets the capacity of volume.
      Parameters:
      capacityValue - capacity
      Returns:
      StorageLocationReport.Builder
    • getCapacity

      public long getCapacity()
    • setScmUsed

      public StorageLocationReport.Builder setScmUsed(long scmUsedValue)
      Sets the scmUsed Value.
      Parameters:
      scmUsedValue - storage space used by scm
      Returns:
      StorageLocationReport.Builder
    • setRemaining

      public StorageLocationReport.Builder setRemaining(long remainingValue)
      Sets the remaining free space value.
      Parameters:
      remainingValue - remaining free space
      Returns:
      StorageLocationReport.Builder
    • setStorageType

      public StorageLocationReport.Builder setStorageType(org.apache.hadoop.fs.StorageType storageTypeValue)
      Sets the storageType.
      Parameters:
      storageTypeValue - type of the storage used
      Returns:
      StorageLocationReport.Builder
    • setCommitted

      public StorageLocationReport.Builder setCommitted(long committed)
      Sets the committed bytes count. (bytes for previously created containers)
      Parameters:
      committed - previously created containers size
      Returns:
      StorageLocationReport.Builder
    • setFreeSpaceToSpare

      public StorageLocationReport.Builder setFreeSpaceToSpare(long freeSpaceToSpare)
      Sets the free space available to spare. (depends on datanode volume config, consider 'hdds.datanode.volume.min.*' configuration properties)
      Parameters:
      freeSpaceToSpare - the size of free volume space available to spare
      Returns:
      StorageLocationReport.Builder
    • setStorageLocation

      public StorageLocationReport.Builder setStorageLocation(String storageLocationValue)
      Sets the storageLocation.
      Parameters:
      storageLocationValue - location of the volume
      Returns:
      StorageLocationReport.Builder
    • build

      public StorageLocationReport build()
      Builds and returns StorageLocationReport instance.
      Returns:
      StorageLocationReport