@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class ResourceUtilization extends Object implements Comparable<ResourceUtilization>
ResourceUtilization
models the utilization of a set of computer
resources in the cluster.
Constructor and Description |
---|
ResourceUtilization() |
Modifier and Type | Method and Description |
---|---|
void |
addTo(int pmem,
int vmem,
float cpu)
Add utilization to the current one.
|
boolean |
equals(Object obj) |
abstract float |
getCPU()
Get CPU utilization (The amount of vcores used).
|
abstract int |
getPhysicalMemory()
Get physical memory.
|
abstract int |
getVirtualMemory()
Get used virtual memory.
|
int |
hashCode() |
static ResourceUtilization |
newInstance(int pmem,
int vmem,
float cpu) |
static ResourceUtilization |
newInstance(ResourceUtilization resourceUtil) |
abstract void |
setCPU(float cpu)
Set CPU utilization (The amount of vcores used).
|
abstract void |
setPhysicalMemory(int pmem)
Set physical memory.
|
abstract void |
setVirtualMemory(int vmem)
Set used virtual memory.
|
void |
subtractFrom(int pmem,
int vmem,
float cpu)
Subtract utilization from the current one.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo
@InterfaceAudience.Public @InterfaceStability.Unstable public static ResourceUtilization newInstance(int pmem, int vmem, float cpu)
@InterfaceAudience.Public @InterfaceStability.Unstable public static ResourceUtilization newInstance(ResourceUtilization resourceUtil)
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int getVirtualMemory()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setVirtualMemory(int vmem)
vmem
- virtual memory in MB@InterfaceAudience.Public @InterfaceStability.Unstable public abstract int getPhysicalMemory()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setPhysicalMemory(int pmem)
pmem
- physical memory in MB@InterfaceAudience.Public @InterfaceStability.Unstable public abstract float getCPU()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract void setCPU(float cpu)
cpu
- CPU utilization@InterfaceAudience.Public @InterfaceStability.Unstable public void addTo(int pmem, int vmem, float cpu)
pmem
- Physical memory used to add.vmem
- Virtual memory used to add.cpu
- CPU utilization to add.@InterfaceAudience.Public @InterfaceStability.Unstable public void subtractFrom(int pmem, int vmem, float cpu)
pmem
- Physical memory to be subtracted.vmem
- Virtual memory to be subtracted.cpu
- CPU utilization to be subtracted.Copyright © 2020 Apache Software Foundation. All rights reserved.