@InterfaceAudience.Public @InterfaceStability.Unstable public class Resource extends BaseResource implements Cloneable
Constructor and Description |
---|
Resource() |
Modifier and Type | Method and Description |
---|---|
long |
calcMemoryMB() |
Object |
clone() |
Resource |
cpus(Integer cpus)
Amount of vcores allocated to each container (optional but overrides cpus
in profile if specified).
|
boolean |
equals(Object o) |
Map<String,org.apache.hadoop.yarn.service.api.records.ResourceInformation> |
getAdditional()
Map of resource name to ResourceInformation
|
Integer |
getCpus() |
String |
getMemory() |
String |
getProfile() |
int |
hashCode() |
Resource |
memory(String memory)
Amount of memory allocated to each container (optional but overrides memory
in profile if specified).
|
Resource |
profile(String profile)
Each resource profile has a unique id which is associated with a
cluster-level predefined memory, cpus, etc.
|
Resource |
resourceInformations(Map<String,org.apache.hadoop.yarn.service.api.records.ResourceInformation> resourceInformations) |
void |
setCpus(Integer cpus) |
void |
setMemory(String memory) |
void |
setProfile(String profile) |
Resource |
setResourceInformations(Map<String,org.apache.hadoop.yarn.service.api.records.ResourceInformation> resourceInformations) |
String |
toString() |
getUri, setUri
public Resource profile(String profile)
public String getProfile()
public void setProfile(String profile)
public Resource cpus(Integer cpus)
public Integer getCpus()
public void setCpus(Integer cpus)
public Resource memory(String memory)
public String getMemory()
public void setMemory(String memory)
public long calcMemoryMB()
public Resource setResourceInformations(Map<String,org.apache.hadoop.yarn.service.api.records.ResourceInformation> resourceInformations)
public Resource resourceInformations(Map<String,org.apache.hadoop.yarn.service.api.records.ResourceInformation> resourceInformations)
public Map<String,org.apache.hadoop.yarn.service.api.records.ResourceInformation> getAdditional()
public String toString()
toString
in class BaseResource
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2023 Apache Software Foundation. All rights reserved.