@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 |
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,
Resource totalResources)
Computes and updates the shares of
Schedulable s 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
Schedulable s in that queue. |
String |
getName() |
void |
initialize(Resource clusterCapacity) |
getDefault, getInstance, isApplicableTo, parse, setDefault
public static final String NAME
public String getName()
getName
in class SchedulingPolicy
SchedulingPolicy
public byte getApplicableDepth()
SchedulingPolicy
SchedulingPolicy
applies togetApplicableDepth
in class SchedulingPolicy
SchedulingPolicy
#DEPTH_*public Comparator<Schedulable> getComparator()
SchedulingPolicy
Schedulable
s in that queue.getComparator
in class SchedulingPolicy
public void computeShares(Collection<? extends Schedulable> schedulables, Resource totalResources)
SchedulingPolicy
Schedulable
s as per the
SchedulingPolicy
, to be used later at schedule time.computeShares
in class SchedulingPolicy
schedulables
- Schedulable
s whose shares are to be updatedtotalResources
- Total Resource
s in the clusterpublic void initialize(Resource clusterCapacity)
initialize
in class SchedulingPolicy
Copyright © 2013 Apache Software Foundation. All rights reserved.