public class TempQueuePerPartition extends AbstractPreemptionEntity
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.yarn.api.records.Resource |
pendingDeductReserved |
amUsed, current, pending, reserved
Constructor and Description |
---|
TempQueuePerPartition(String queueName,
org.apache.hadoop.yarn.api.records.Resource current,
boolean preemptionDisabled,
String partition,
org.apache.hadoop.yarn.api.records.Resource killable,
float absCapacity,
float absMaxCapacity,
org.apache.hadoop.yarn.api.records.Resource totalPartitionResource,
org.apache.hadoop.yarn.api.records.Resource reserved,
CSQueue queue,
org.apache.hadoop.yarn.api.records.Resource effMinRes,
org.apache.hadoop.yarn.api.records.Resource effMaxRes) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.hadoop.yarn.api.records.Resource |
acceptedByLocality(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc,
org.apache.hadoop.yarn.api.records.Resource offered)
This method is visible to allow sub-classes to override the behavior,
specifically to take into account locality-based limitations of how much
the queue can consumed.
|
void |
addAllApps(Collection<TempAppPerPartition> orderedApps) |
void |
addChild(TempQueuePerPartition q)
When adding a child we also aggregate its pending resource needs.
|
void |
addUserPerPartition(String userName,
TempUserPerPartition tmpUser) |
void |
assignPreemption(float scalingFactor,
org.apache.hadoop.yarn.util.resource.ResourceCalculator rc,
org.apache.hadoop.yarn.api.records.Resource clusterResource) |
void |
deductActuallyToBePreempted(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc,
org.apache.hadoop.yarn.api.records.Resource cluster,
org.apache.hadoop.yarn.api.records.Resource toBeDeduct) |
protected org.apache.hadoop.yarn.api.records.Resource |
filterByMaxDeductAssigned(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc,
org.apache.hadoop.yarn.api.records.Resource clusterResource,
org.apache.hadoop.yarn.api.records.Resource offered)
This method is visible to allow sub-classes to override the behavior,
specifically for federation purposes we do not want to cap resources as it
is done here.
|
Collection<TempAppPerPartition> |
getApps() |
ArrayList<TempQueuePerPartition> |
getChildren() |
org.apache.hadoop.yarn.api.records.Resource |
getGuaranteed() |
org.apache.hadoop.yarn.api.records.Resource |
getIdealAssigned() |
org.apache.hadoop.yarn.api.records.Resource |
getMax() |
Map<String,TempUserPerPartition> |
getUsersPerPartition() |
protected void |
initializeRootIdealWithGuarangeed()
This method is visible to allow sub-classes to ovverride the behavior,
specifically for federation purposes we need to initialize per-sub-cluster
roots as well as the global one.
|
void |
setLeafQueue(LeafQueue l) |
void |
setPending(org.apache.hadoop.yarn.api.records.Resource pending) |
String |
toGlobalString() |
String |
toString() |
void |
updatePreemptableExtras(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc) |
getActuallyToBePreempted, getAMUsed, getPending, getQueueName, getReserved, getToBePreemptFromOther, getUsed, getUsedDeductAM, setActuallyToBePreempted, setToBePreemptFromOther
protected org.apache.hadoop.yarn.api.records.Resource pendingDeductReserved
public TempQueuePerPartition(String queueName, org.apache.hadoop.yarn.api.records.Resource current, boolean preemptionDisabled, String partition, org.apache.hadoop.yarn.api.records.Resource killable, float absCapacity, float absMaxCapacity, org.apache.hadoop.yarn.api.records.Resource totalPartitionResource, org.apache.hadoop.yarn.api.records.Resource reserved, CSQueue queue, org.apache.hadoop.yarn.api.records.Resource effMinRes, org.apache.hadoop.yarn.api.records.Resource effMaxRes)
public void setLeafQueue(LeafQueue l)
public void addChild(TempQueuePerPartition q)
q
- the child queue to add to this queuepublic ArrayList<TempQueuePerPartition> getChildren()
public org.apache.hadoop.yarn.api.records.Resource getGuaranteed()
public org.apache.hadoop.yarn.api.records.Resource getMax()
public void updatePreemptableExtras(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc)
public void assignPreemption(float scalingFactor, org.apache.hadoop.yarn.util.resource.ResourceCalculator rc, org.apache.hadoop.yarn.api.records.Resource clusterResource)
public void deductActuallyToBePreempted(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc, org.apache.hadoop.yarn.api.records.Resource cluster, org.apache.hadoop.yarn.api.records.Resource toBeDeduct)
public void addAllApps(Collection<TempAppPerPartition> orderedApps)
public Collection<TempAppPerPartition> getApps()
public void addUserPerPartition(String userName, TempUserPerPartition tmpUser)
public Map<String,TempUserPerPartition> getUsersPerPartition()
public void setPending(org.apache.hadoop.yarn.api.records.Resource pending)
public org.apache.hadoop.yarn.api.records.Resource getIdealAssigned()
public String toGlobalString()
protected org.apache.hadoop.yarn.api.records.Resource acceptedByLocality(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc, org.apache.hadoop.yarn.api.records.Resource offered)
rc
- the ResourceCalculator to be used.offered
- the input amount of Resource offered to this queue.protected org.apache.hadoop.yarn.api.records.Resource filterByMaxDeductAssigned(org.apache.hadoop.yarn.util.resource.ResourceCalculator rc, org.apache.hadoop.yarn.api.records.Resource clusterResource, org.apache.hadoop.yarn.api.records.Resource offered)
rc
- the ResourceCalculator
to be usedclusterResource
- the total cluster resourcesoffered
- the resources offered to this queueprotected void initializeRootIdealWithGuarangeed()
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.