public class ResourceRequestSet
extends java.lang.Object
ResourceRequestSetKey.| Constructor | 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 | Description |
|---|---|---|
void |
addAndOverrideRR(org.apache.hadoop.yarn.api.records.ResourceRequest ask) |
Add a
ResourceRequest into the requestSet. |
void |
addAndOverrideRRSet(ResourceRequestSet requestSet) |
Merge a requestSet into this one.
|
void |
cleanupZeroNonAnyRR() |
Remove all non-Any ResourceRequests from the set.
|
java.util.Map<java.lang.String,org.apache.hadoop.yarn.api.records.ResourceRequest> |
getAsks() |
|
int |
getNumContainers() |
|
java.util.Collection<org.apache.hadoop.yarn.api.records.ResourceRequest> |
getRRs() |
|
boolean |
isANYRelaxable() |
Whether the request set is relaxable at ANY level.
|
void |
setNumContainers(int newValue) |
Force set the # of containers to ask for this requestSet to a given value.
|
java.lang.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.YarnException - indicates exceptions from yarn servers.public void addAndOverrideRRSet(ResourceRequestSet requestSet) throws org.apache.hadoop.yarn.exceptions.YarnException
requestSet - the requestSet to mergeorg.apache.hadoop.yarn.exceptions.YarnException - indicates exceptions from yarn servers.public void cleanupZeroNonAnyRR()
public java.util.Map<java.lang.String,org.apache.hadoop.yarn.api.records.ResourceRequest> getAsks()
public java.util.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.YarnException - indicates exceptions from yarn servers.public boolean isANYRelaxable()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.