|
||||||||||
| 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
org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.policies.FifoPolicy
@InterfaceAudience.Private @InterfaceStability.Unstable public class FifoPolicy
| Field Summary | |
|---|---|
static String |
NAME
|
| Fields inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.SchedulingPolicy |
|---|
DEFAULT_POLICY, DEPTH_ANY, DEPTH_INTERMEDIATE, DEPTH_LEAF, DEPTH_PARENT, DEPTH_ROOT |
| Constructor Summary | |
|---|---|
FifoPolicy()
|
|
| Method Summary | |
|---|---|
boolean |
checkIfAMResourceUsageOverLimit(org.apache.hadoop.yarn.api.records.Resource usage,
org.apache.hadoop.yarn.api.records.Resource maxAMResource)
Check if a leaf queue's AM resource usage over its limit under this policy |
boolean |
checkIfUsageOverFairShare(org.apache.hadoop.yarn.api.records.Resource usage,
org.apache.hadoop.yarn.api.records.Resource fairShare)
Check if the resource usage is over the fair share under this policy |
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 for scheduling decisions. |
void |
computeSteadyShares(Collection<? extends FSQueue> queues,
org.apache.hadoop.yarn.api.records.Resource totalResources)
Computes and updates the steady shares of FSQueues as per the
SchedulingPolicy. |
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. |
org.apache.hadoop.yarn.api.records.Resource |
getHeadroom(org.apache.hadoop.yarn.api.records.Resource queueFairShare,
org.apache.hadoop.yarn.api.records.Resource queueUsage,
org.apache.hadoop.yarn.api.records.Resource clusterAvailable)
Get headroom by calculating the min of clusterAvailable and
(queueFairShare - queueUsage) resources that are
applicable to this policy. |
String |
getName()
|
| Methods inherited from class org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.SchedulingPolicy |
|---|
getInstance, initialize, isApplicableTo, parse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String NAME
| Constructor Detail |
|---|
public FifoPolicy()
| Method Detail |
|---|
public String getName()
getName in class SchedulingPolicySchedulingPolicypublic Comparator<Schedulable> getComparator()
SchedulingPolicySchedulables in that queue.
getComparator in class SchedulingPolicy
public void computeShares(Collection<? extends Schedulable> schedulables,
org.apache.hadoop.yarn.api.records.Resource totalResources)
SchedulingPolicySchedulables as per
the SchedulingPolicy, to be used later for scheduling decisions.
The shares computed are instantaneous and only consider queues with
running applications.
computeShares in class SchedulingPolicyschedulables - Schedulables whose shares are to be updatedtotalResources - Total Resources in the cluster
public void computeSteadyShares(Collection<? extends FSQueue> queues,
org.apache.hadoop.yarn.api.records.Resource totalResources)
SchedulingPolicyFSQueues as per the
SchedulingPolicy. The steady share does not differentiate
between queues with and without running applications under them. The
steady share is not used for scheduling, it is displayed on the Web UI
for better visibility.
computeSteadyShares in class SchedulingPolicyqueues - FSQueues whose shares are to be updatedtotalResources - Total Resources in the cluster
public boolean checkIfUsageOverFairShare(org.apache.hadoop.yarn.api.records.Resource usage,
org.apache.hadoop.yarn.api.records.Resource fairShare)
SchedulingPolicy
checkIfUsageOverFairShare in class SchedulingPolicyusage - Resource the resource usagefairShare - Resource the fair share
public boolean checkIfAMResourceUsageOverLimit(org.apache.hadoop.yarn.api.records.Resource usage,
org.apache.hadoop.yarn.api.records.Resource maxAMResource)
SchedulingPolicy
checkIfAMResourceUsageOverLimit in class SchedulingPolicyusage - Resource the resource used by application mastersmaxAMResource - Resource the maximum allowed resource for
application masters
public org.apache.hadoop.yarn.api.records.Resource getHeadroom(org.apache.hadoop.yarn.api.records.Resource queueFairShare,
org.apache.hadoop.yarn.api.records.Resource queueUsage,
org.apache.hadoop.yarn.api.records.Resource clusterAvailable)
SchedulingPolicyclusterAvailable and
(queueFairShare - queueUsage) resources that are
applicable to this policy. For eg if only memory then leave other
resources such as CPU to same as clusterAvailable.
getHeadroom in class SchedulingPolicyqueueFairShare - fairshare in the queuequeueUsage - resources used in the queueclusterAvailable - available resource in cluster
public byte getApplicableDepth()
SchedulingPolicySchedulingPolicy
applies to
getApplicableDepth in class SchedulingPolicySchedulingPolicy#DEPTH_*
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||