|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.SchedulingPolicy
@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class SchedulingPolicy
Field Summary | |
---|---|
static byte |
DEPTH_ANY
|
static byte |
DEPTH_INTERMEDIATE
|
static byte |
DEPTH_LEAF
|
static byte |
DEPTH_PARENT
|
static byte |
DEPTH_ROOT
|
Constructor Summary | |
---|---|
SchedulingPolicy()
|
Method Summary | |
---|---|
abstract void |
computeShares(Collection<? extends Schedulable> schedulables,
org.apache.hadoop.yarn.api.records.Resource totalResources)
Computes and updates the shares of Schedulable s as per the
SchedulingPolicy , to be used later at schedule time. |
abstract byte |
getApplicableDepth()
Specifies the depths in the hierarchy, this SchedulingPolicy
applies to |
abstract Comparator<Schedulable> |
getComparator()
The comparator returned by this method is to be used for sorting the Schedulable s in that queue. |
static SchedulingPolicy |
getDefault()
|
static SchedulingPolicy |
getInstance(Class<? extends SchedulingPolicy> clazz)
Returns a SchedulingPolicy instance corresponding to the passed clazz |
abstract String |
getName()
|
void |
initialize(org.apache.hadoop.yarn.api.records.Resource clusterCapacity)
|
static boolean |
isApplicableTo(SchedulingPolicy policy,
byte depth)
Checks if the specified SchedulingPolicy can be used for a queue at
the specified depth in the hierarchy |
static SchedulingPolicy |
parse(String policy)
Returns SchedulingPolicy instance corresponding to the
SchedulingPolicy passed as a string. |
static void |
setDefault(String className)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte DEPTH_LEAF
public static final byte DEPTH_INTERMEDIATE
public static final byte DEPTH_ROOT
public static final byte DEPTH_PARENT
public static final byte DEPTH_ANY
Constructor Detail |
---|
public SchedulingPolicy()
Method Detail |
---|
public static SchedulingPolicy getDefault()
public static void setDefault(String className) throws AllocationConfigurationException
AllocationConfigurationException
public static SchedulingPolicy getInstance(Class<? extends SchedulingPolicy> clazz)
SchedulingPolicy
instance corresponding to the passed clazz
public static SchedulingPolicy parse(String policy) throws AllocationConfigurationException
SchedulingPolicy
instance corresponding to the
SchedulingPolicy
passed as a string. The policy can be "fair" for
FairSharePolicy, "fifo" for FifoPolicy, or "drf" for
DominantResourceFairnessPolicy. For a custom
SchedulingPolicy
s in the RM classpath, the policy should be
canonical class name of the SchedulingPolicy
.
policy
- canonical class name or "drf" or "fair" or "fifo"
AllocationConfigurationException
public void initialize(org.apache.hadoop.yarn.api.records.Resource clusterCapacity)
public abstract String getName()
SchedulingPolicy
public abstract byte getApplicableDepth()
SchedulingPolicy
applies to
SchedulingPolicy
#DEPTH_*public static boolean isApplicableTo(SchedulingPolicy policy, byte depth)
SchedulingPolicy
can be used for a queue at
the specified depth in the hierarchy
policy
- SchedulingPolicy
we are checking the
depth-applicability fordepth
- queue's depth in the hierarchy
public abstract Comparator<Schedulable> getComparator()
Schedulable
s in that queue.
public abstract void computeShares(Collection<? extends Schedulable> schedulables, org.apache.hadoop.yarn.api.records.Resource totalResources)
Schedulable
s as per the
SchedulingPolicy
, to be used later at schedule time.
schedulables
- Schedulable
s whose shares are to be updatedtotalResources
- Total Resource
s in the cluster
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |