Class StorageLocationReport.Builder
java.lang.Object
org.apache.hadoop.ozone.container.common.impl.StorageLocationReport.Builder
- Enclosing class:
StorageLocationReport
Builder class for building StorageLocationReport.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns StorageLocationReport instance.longbooleanisFailed()setCapacity(long capacityValue) Sets the capacity of volume.setCommitted(long committed) Sets the committed bytes count.setFailed(boolean failedValue) Sets whether the volume failed or not.setFreeSpaceToSpare(long freeSpaceToSpare) Sets the free space available to spare.Sets the storageId.setRemaining(long remainingValue) Sets the remaining free space value.setScmUsed(long scmUsedValue) Sets the scmUsed Value.setStorageLocation(String storageLocationValue) Sets the storageLocation.setStorageType(org.apache.hadoop.fs.StorageType storageTypeValue) Sets the storageType.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setId
Sets the storageId.- Parameters:
idValue- storageId- Returns:
- StorageLocationReport.Builder
-
setFailed
Sets whether the volume failed or not.- Parameters:
failedValue- whether volume failed or not- Returns:
- StorageLocationReport.Builder
-
isFailed
public boolean isFailed() -
setCapacity
Sets the capacity of volume.- Parameters:
capacityValue- capacity- Returns:
- StorageLocationReport.Builder
-
getCapacity
public long getCapacity() -
setScmUsed
Sets the scmUsed Value.- Parameters:
scmUsedValue- storage space used by scm- Returns:
- StorageLocationReport.Builder
-
setRemaining
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
Sets the committed bytes count. (bytes for previously created containers)- Parameters:
committed- previously created containers size- Returns:
- StorageLocationReport.Builder
-
setFreeSpaceToSpare
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
Sets the storageLocation.- Parameters:
storageLocationValue- location of the volume- Returns:
- StorageLocationReport.Builder
-
build
Builds and returns StorageLocationReport instance.- Returns:
- StorageLocationReport
-