|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.uima.ducc.rm.scheduler.NodepoolScheduler
public class NodepoolScheduler
This implementation of IScheduler is the initial implementation of a scheduler using classes.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.uima.ducc.rm.scheduler.SchedConstants |
|---|
SchedConstants.EvictionPolicy, SchedConstants.Policy |
| Field Summary |
|---|
| Fields inherited from interface org.apache.uima.ducc.rm.scheduler.SchedConstants |
|---|
COMPONENT_NAME, DEFAULT_INIT_STABILITY_COUNT, DEFAULT_INSTANCES, DEFAULT_MAX_INSTANCES, DEFAULT_MAX_PROCESSES, DEFAULT_NODE_METRICS_RATE, DEFAULT_PRIORITY, DEFAULT_PROCESSES, DEFAULT_SCHEDULING_RATE, DEFAULT_SCHEDULING_RATIO, DEFAULT_SHARE_WEIGHT, DEFAULT_STABILITY_COUNT |
| Method Summary | |
|---|---|
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,
int total_shares,
String descr)
|
protected void |
countClassShares(org.apache.uima.ducc.rm.scheduler.NodePool np,
ArrayList<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)
|
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 void |
howMuchFixed(ArrayList<ResourceClass> rcs)
Make sure there are enough shares to allocate either directly, or through preemption, and count them out. |
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 void |
traverseNodepoolsForCounts(org.apache.uima.ducc.rm.scheduler.NodePool np,
ArrayList<ResourceClass> rcs)
Depth-first traversal of the nodepool. |
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)
|
protected void |
whatOfFixedShare(ArrayList<ResourceClass> rcs)
All-or-nothing makes this easy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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 IScheduler
protected void apportion_qshares(List<org.apache.uima.ducc.rm.scheduler.IEntity> entities,
int[] vshares,
int total_shares,
String descr)
protected void countClassShares(org.apache.uima.ducc.rm.scheduler.NodePool np,
ArrayList<ResourceClass> rcs)
protected boolean countUserShares(ResourceClass rc)
protected void traverseNodepoolsForCounts(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 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 howMuchFixed(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 IScheduler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||