Class ConfigurableResource
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.ConfigurableResource
A
ConfigurableResource object represents an entity that is used to
configure resources, such as maximum resources of a queue. It can be
percentage of cluster resources or an absolute value.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]org.apache.hadoop.yarn.api.records.ResourceGet the absolute resource.org.apache.hadoop.yarn.api.records.ResourcegetResource(org.apache.hadoop.yarn.api.records.Resource clusterResource) Get resource by multiplying the cluster resource and the percentage of each resource respectively.
-
Constructor Details
-
ConfigurableResource
public ConfigurableResource(org.apache.hadoop.yarn.api.records.Resource resource)
-
-
Method Details
-
getResource
public org.apache.hadoop.yarn.api.records.Resource getResource(org.apache.hadoop.yarn.api.records.Resource clusterResource) Get resource by multiplying the cluster resource and the percentage of each resource respectively. Return the absolute resource if eitherpercentagesorclusterResourceis null.- Parameters:
clusterResource- the cluster resource- Returns:
- resource the resulting resource
-
getResource
public org.apache.hadoop.yarn.api.records.Resource getResource()Get the absolute resource.- Returns:
- the absolute resource
-
getPercentages
public double[] getPercentages()
-