@InterfaceAudience.Private @InterfaceStability.Unstable public class DominantResourceFairnessPolicy extends SchedulingPolicy
| Modifier and Type | Class and Description |
|---|---|
static class |
DominantResourceFairnessPolicy.DominantResourceFairnessComparator |
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
DEFAULT_POLICY, DEPTH_ANY, DEPTH_INTERMEDIATE, DEPTH_LEAF, DEPTH_PARENT, DEPTH_ROOT| Constructor and Description |
|---|
DominantResourceFairnessPolicy() |
| Modifier and Type | Method and Description |
|---|---|
void |
computeShares(Collection<? extends Schedulable> schedulables,
org.apache.hadoop.yarn.api.records.Resource totalResources)
Computes and updates the shares of
Schedulables as per the
SchedulingPolicy, to be used later at schedule time. |
byte |
getApplicableDepth()
Specifies the depths in the hierarchy, this
SchedulingPolicy
applies to |
Comparator<Schedulable> |
getComparator()
The comparator returned by this method is to be used for sorting the
Schedulables in that queue. |
String |
getName() |
void |
initialize(org.apache.hadoop.yarn.api.records.Resource clusterCapacity) |
getInstance, isApplicableTo, parsepublic static final String NAME
public String getName()
getName in class SchedulingPolicySchedulingPolicypublic byte getApplicableDepth()
SchedulingPolicySchedulingPolicy
applies togetApplicableDepth in class SchedulingPolicySchedulingPolicy#DEPTH_*public Comparator<Schedulable> getComparator()
SchedulingPolicySchedulables in that queue.getComparator in class SchedulingPolicypublic void computeShares(Collection<? extends Schedulable> schedulables, org.apache.hadoop.yarn.api.records.Resource totalResources)
SchedulingPolicySchedulables as per the
SchedulingPolicy, to be used later at schedule time.computeShares in class SchedulingPolicyschedulables - Schedulables whose shares are to be updatedtotalResources - Total Resources in the clusterpublic void initialize(org.apache.hadoop.yarn.api.records.Resource clusterCapacity)
initialize in class SchedulingPolicyCopyright © 2014 Apache Software Foundation. All Rights Reserved.