public class DiskBalancerVolume extends Object
Constructor and Description |
---|
DiskBalancerVolume()
Constructs DiskBalancerVolume.
|
Modifier and Type | Method and Description |
---|---|
long |
computeEffectiveCapacity()
Returns effective capacity of a volume.
|
float |
computeUsedPercentage()
Returns the usedPercentage of a disk.
|
boolean |
equals(Object o)
Compares two volumes and decides if it is the same volume.
|
long |
getCapacity()
Capacity of this volume.
|
double |
getFreeRatio()
Get ratio between free space and capacity.
|
long |
getFreeSpace()
Get free space of the volume.
|
String |
getPath()
Returns the path for this volume.
|
long |
getReserved()
Gets the reserved size for this volume.
|
String |
getStorageType()
Gets the StorageType.
|
long |
getUsed()
Gets the dfsUsed Size.
|
double |
getUsedRatio()
Get ratio between used space and capacity.
|
String |
getUuid()
Gets the uuid for this volume.
|
double |
getVolumeDataDensity()
Get this volume Data Density
Please see DiskBalancerVolumeSet#computeVolumeDataDensity to see how
this is computed.
|
int |
hashCode()
Computes hash code for a diskBalancerVolume.
|
boolean |
isFailed()
Indicates if this is a failed volume.
|
boolean |
isReadOnly()
Tells us if this volume is read-only.
|
boolean |
isSkip()
returns if we should skip this volume.
|
boolean |
isTransient()
Indicates if the volume is Transient in nature.
|
static DiskBalancerVolume |
parseJson(String json)
Parses a Json string and converts to DiskBalancerVolume.
|
void |
setCapacity(long totalCapacity)
Sets the capacity of this volume.
|
void |
setFailed(boolean fail)
Sets the failed flag for this volume.
|
void |
setIsTransient(boolean transientValue)
Tells us if a volume is transient.
|
void |
setPath(String volPath)
Sets the path for this volume.
|
void |
setReadOnly(boolean readOnly)
Sets this volume as read only.
|
void |
setReserved(long reservedSize)
Sets the reserved size.
|
void |
setSkip(boolean skipValue)
Sets the Skip value for this volume.
|
void |
setStorageType(String typeOfStorage)
Sets the StorageType.
|
void |
setTransient(boolean aTransient)
Sets volumes transient nature.
|
void |
setUsed(long dfsUsedSpace)
Sets the used Space for Long.
|
void |
setUuid(String id)
Sets the uuid for this volume.
|
void |
setVolumeDataDensity(double volDataDensity)
Sets this volume's data density.
|
String |
toJson()
returns a Json String.
|
public static DiskBalancerVolume parseJson(String json) throws IOException
json
- - Json StringIOException
public double getVolumeDataDensity()
public void setVolumeDataDensity(double volDataDensity)
volDataDensity
- - densitypublic boolean isTransient()
public void setTransient(boolean aTransient)
aTransient
- - boolpublic boolean equals(Object o)
public int hashCode()
public long getCapacity()
public long getFreeSpace()
public double getUsedRatio()
public double getFreeRatio()
public void setCapacity(long totalCapacity)
totalCapacity
- longpublic boolean isFailed()
public void setFailed(boolean fail)
fail
- booleanpublic String getPath()
public void setPath(String volPath)
volPath
- Pathpublic long getReserved()
public void setReserved(long reservedSize)
reservedSize
- -- Sets the reserved.public String getStorageType()
public void setStorageType(String typeOfStorage)
typeOfStorage
- - Storage Type String.public long getUsed()
public void setUsed(long dfsUsedSpace)
dfsUsedSpace
- - dfsUsedSpace for this volume.public String getUuid()
public void setUuid(String id)
id
- - Stringpublic long computeEffectiveCapacity()
public String toJson() throws IOException
IOException
public boolean isSkip()
public void setSkip(boolean skipValue)
skipValue
- boolpublic float computeUsedPercentage()
public void setIsTransient(boolean transientValue)
transientValue
- public boolean isReadOnly()
public void setReadOnly(boolean readOnly)
readOnly
- - booleanCopyright © 2008–2024 Apache Software Foundation. All rights reserved.