public class ResourceRequestSet extends Object
ResourceRequestSetKey.| Constructor and Description | 
|---|
| ResourceRequestSet(ResourceRequestSet other)Create a shallow copy of the request set. | 
| ResourceRequestSet(ResourceRequestSetKey key)Create a empty set with given key. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addAndOverrideRR(org.apache.hadoop.yarn.api.records.ResourceRequest ask)Add a  ResourceRequestinto the requestSet. | 
| void | addAndOverrideRRSet(ResourceRequestSet requestSet)Merge a requestSet into this one. | 
| void | cleanupZeroNonAnyRR()Remove all non-Any ResourceRequests from the set. | 
| Map<String,org.apache.hadoop.yarn.api.records.ResourceRequest> | getAsks() | 
| int | getNumContainers() | 
| Collection<org.apache.hadoop.yarn.api.records.ResourceRequest> | getRRs() | 
| void | setNumContainers(int newValue)Force set the # of containers to ask for this requestSet to a given value. | 
| String | toString() | 
public ResourceRequestSet(ResourceRequestSetKey key) throws org.apache.hadoop.yarn.exceptions.YarnException
key - the key of the request setorg.apache.hadoop.yarn.exceptions.YarnException - if failspublic ResourceRequestSet(ResourceRequestSet other)
other - the set of copy frompublic void addAndOverrideRR(org.apache.hadoop.yarn.api.records.ResourceRequest ask)
                      throws org.apache.hadoop.yarn.exceptions.YarnException
ResourceRequest into the requestSet. If there's already an RR
 with the same resource name, override it and update accordingly.ask - the new ResourceRequestorg.apache.hadoop.yarn.exceptions.YarnExceptionpublic void addAndOverrideRRSet(ResourceRequestSet requestSet) throws org.apache.hadoop.yarn.exceptions.YarnException
requestSet - the requestSet to mergeorg.apache.hadoop.yarn.exceptions.YarnExceptionpublic void cleanupZeroNonAnyRR()
public Collection<org.apache.hadoop.yarn.api.records.ResourceRequest> getRRs()
public int getNumContainers()
public void setNumContainers(int newValue)
                      throws org.apache.hadoop.yarn.exceptions.YarnException
newValue - the new # of containers valueorg.apache.hadoop.yarn.exceptions.YarnExceptionCopyright © 2008–2023 Apache Software Foundation. All rights reserved.