public class NodepoolScheduler extends Object implements IScheduler, SchedConstants
SchedConstants.EvictionPolicy, SchedConstants.PolicyCOMPONENT_NAME, DEFAULT_INIT_STABILITY_COUNT, DEFAULT_INSTANCES, DEFAULT_MAX_INSTANCES, DEFAULT_MAX_PROCESSES, DEFAULT_NODE_METRICS_RATE, DEFAULT_OR_PUBLISH_RATE, DEFAULT_PRIORITY, DEFAULT_PROCESSES, DEFAULT_RM_PUBLISHING_SLOP, DEFAULT_SCHEDULING_RATE, DEFAULT_SCHEDULING_RATIO, DEFAULT_SHARE_WEIGHT, DEFAULT_STABILITY_COUNT| Modifier and Type | Method and Description |
|---|---|
protected void |
accountForFairShare()
Remove active shares from the nodepool counts, leaving us with just the free shares in the tables.
|
protected void |
accountForNonPreemptable()
Remove non-preemptable resources from the counts.
|
protected void |
apportion_qshares(List<org.apache.uima.ducc.rm.scheduler.IEntity> entities,
int[] vshares,
String descr) |
protected void |
countClassShares(org.apache.uima.ducc.rm.scheduler.NodePool np,
List<ResourceClass> rcs)
Count out shares for only the jobs in the ResouceClasses here, and only from the given
nodepool.
|
protected boolean |
countUserShares(ResourceClass rc)
Count out shares for only the jobs in the ResouceClasses here, and only from the given
nodepool.
|
protected void |
doEvictions(org.apache.uima.ducc.rm.scheduler.NodePool nodepool)
Collect all the fair-share classes and pass them to the nodepools for eviction
This interacts recursively with NodePool.doEvictions*.
|
protected void |
expandNeedyJobs(org.apache.uima.ducc.rm.scheduler.NodePool np,
ArrayList<ResourceClass> rcs)
Expand jobs from the needy list ahead of other jobs, because we likely stole the
shares from older jobs which would otherwise get priority.
|
protected void |
findHowMuch(ArrayList<ResourceClass> rcs)
The second stage - work up all counts globally
|
protected void |
findWhatOf(ArrayList<ResourceClass> rcs)
The third stage - work up all counts globally
|
protected boolean |
jobInClass(ArrayList<ResourceClass> rcs,
IRmJob j)
Is the job submitted to one of these classes?
|
void |
schedule(SchedulingUpdate upd)
IScheduler entry point for the fairShare calculation.
|
void |
setClasses(Map<ResourceClass,ResourceClass> prclasses) |
void |
setEvictionPolicy(SchedConstants.EvictionPolicy ep) |
void |
setNodePool(org.apache.uima.ducc.rm.scheduler.NodePool np) |
protected List<ResourceClass> |
traverseNodepoolsForCounts(org.apache.uima.ducc.rm.scheduler.NodePool np,
List<ResourceClass> eligible)
Do a depth-first traversal of the nodepool calculating counts for all the jobs in the nodepool and its children.
|
protected void |
traverseNodepoolsForExpansion(org.apache.uima.ducc.rm.scheduler.NodePool np,
ArrayList<ResourceClass> rcs) |
protected void |
updateNodepools(org.apache.uima.ducc.rm.scheduler.NodePool np,
ArrayList<ResourceClass> rcs) |
protected void |
whatOfFairShare(ArrayList<ResourceClass> rcs)
Counts are established.
|
protected void |
whatOfFixedShare(ArrayList<ResourceClass> rcs)
If there are free shares of the right order just assign them.
|
public void setClasses(Map<ResourceClass,ResourceClass> prclasses)
setClasses in interface ISchedulerpublic void setNodePool(org.apache.uima.ducc.rm.scheduler.NodePool np)
setNodePool in interface ISchedulerpublic void setEvictionPolicy(SchedConstants.EvictionPolicy ep)
setEvictionPolicy in interface ISchedulerprotected void apportion_qshares(List<org.apache.uima.ducc.rm.scheduler.IEntity> entities, int[] vshares, String descr)
protected void countClassShares(org.apache.uima.ducc.rm.scheduler.NodePool np,
List<ResourceClass> rcs)
protected boolean countUserShares(ResourceClass rc)
protected List<ResourceClass> traverseNodepoolsForCounts(org.apache.uima.ducc.rm.scheduler.NodePool np, List<ResourceClass> eligible)
np - eligible - protected void updateNodepools(org.apache.uima.ducc.rm.scheduler.NodePool np,
ArrayList<ResourceClass> rcs)
protected boolean jobInClass(ArrayList<ResourceClass> rcs, IRmJob j)
protected void expandNeedyJobs(org.apache.uima.ducc.rm.scheduler.NodePool np,
ArrayList<ResourceClass> rcs)
protected void traverseNodepoolsForExpansion(org.apache.uima.ducc.rm.scheduler.NodePool np,
ArrayList<ResourceClass> rcs)
protected void whatOfFairShare(ArrayList<ResourceClass> rcs)
protected void whatOfFixedShare(ArrayList<ResourceClass> rcs)
protected void accountForNonPreemptable()
protected void accountForFairShare()
protected void findHowMuch(ArrayList<ResourceClass> rcs)
protected void doEvictions(org.apache.uima.ducc.rm.scheduler.NodePool nodepool)
protected void findWhatOf(ArrayList<ResourceClass> rcs)
public void schedule(SchedulingUpdate upd)
schedule in interface ISchedulerCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.