|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.uima.ducc.rm.scheduler.Scheduler
public class Scheduler
This process orchestrates scheduling. - Receives requests from clients ( job manager, service manager, etc ) for resources - Forwards requests and current state to pluggable scheduling implementation - Receives a schedule, updates state, sends responses to requestors - Maintains state as needed (work item life cycle etc)
| 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 |
| Constructor Summary | |
|---|---|
Scheduler()
|
|
| Method Summary | |
|---|---|
String |
getDefaultFairShareName()
|
int |
getDefaultMemory()
|
int |
getDefaultNTasks()
|
int |
getDefaultNThreads()
|
String |
getDefaultReserveName()
|
IRmJob |
getJob(org.apache.uima.ducc.common.utils.id.DuccId id)
|
Machine |
getMachine(org.apache.uima.ducc.common.Node n)
|
Machine |
getMachine(org.apache.uima.ducc.common.NodeIdentity ni)
|
ResourceClass |
getResourceClass(String name)
|
Share |
getShare(org.apache.uima.ducc.common.utils.id.DuccId id)
|
protected void |
handleDeadNodes()
|
void |
init()
|
boolean |
isInitialized()
|
void |
jobCancelled(org.apache.uima.ducc.common.utils.id.DuccId id)
|
static org.apache.uima.ducc.common.utils.id.DuccId |
newId()
|
static org.apache.uima.ducc.common.utils.id.DuccId |
newId(long id)
|
void |
nodeArrives(org.apache.uima.ducc.common.Node node)
|
void |
nodeDeath(Map<org.apache.uima.ducc.common.Node,org.apache.uima.ducc.common.Node> nodes)
|
void |
processRecovery(IRmJob j)
Make this public for log following. |
void |
queryMachines()
|
boolean |
ready()
We don't accept new work or even Orchestrator state updates until "ready". |
void |
resetNodepools()
Log following / reconstruction, needed to init before recovery. |
JobManagerUpdate |
schedule()
We first accept any changes and requests from the outside world and place them where they can be acted on in this epoch. |
void |
setJobManager(IJobManager jobmanager)
|
void |
shutdown()
|
void |
signalCompletion(org.apache.uima.ducc.common.utils.id.DuccId id)
Callback from job manager when a job completes. |
void |
signalCompletion(IRmJob job,
Share share)
Callback from job manager when a specific share exits but the job is still alive. |
void |
signalInitialized(IRmJob job)
|
void |
signalNewWork(IRmJob job)
Callback from job manager, need shares for a new fair-share job. |
void |
signalRecovery(IRmJob job)
|
void |
start()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Scheduler()
| Method Detail |
|---|
public void init()
throws Exception
init in interface ISchedulerMainExceptionpublic boolean isInitialized()
isInitialized in interface ISchedulerMainpublic Machine getMachine(org.apache.uima.ducc.common.Node n)
public Machine getMachine(org.apache.uima.ducc.common.NodeIdentity ni)
getMachine in interface ISchedulerMainpublic void setJobManager(IJobManager jobmanager)
public String getDefaultFairShareName()
getDefaultFairShareName in interface ISchedulerMainpublic String getDefaultReserveName()
getDefaultReserveName in interface ISchedulerMainpublic int getDefaultNThreads()
getDefaultNThreads in interface ISchedulerMainpublic int getDefaultNTasks()
getDefaultNTasks in interface ISchedulerMainpublic int getDefaultMemory()
getDefaultMemory in interface ISchedulerMainpublic ResourceClass getResourceClass(String name)
getResourceClass in interface ISchedulerMainpublic IRmJob getJob(org.apache.uima.ducc.common.utils.id.DuccId id)
getJob in interface ISchedulerMainpublic Share getShare(org.apache.uima.ducc.common.utils.id.DuccId id)
getShare in interface ISchedulerMainpublic boolean ready()
ready in interface ISchedulerMainpublic void start()
start in interface ISchedulerMainprotected void handleDeadNodes()
public JobManagerUpdate schedule()
schedule in interface ISchedulerMainpublic void shutdown()
public void nodeArrives(org.apache.uima.ducc.common.Node node)
nodeArrives in interface ISchedulerMainpublic void nodeDeath(Map<org.apache.uima.ducc.common.Node,org.apache.uima.ducc.common.Node> nodes)
nodeDeath in interface ISchedulerMainpublic void signalNewWork(IRmJob job)
signalNewWork in interface ISchedulerMainpublic void signalInitialized(IRmJob job)
signalInitialized in interface ISchedulerMainpublic void signalRecovery(IRmJob job)
signalRecovery in interface ISchedulerMainpublic void jobCancelled(org.apache.uima.ducc.common.utils.id.DuccId id)
public void signalCompletion(org.apache.uima.ducc.common.utils.id.DuccId id)
signalCompletion in interface ISchedulerMain
public void signalCompletion(IRmJob job,
Share share)
signalCompletion in interface ISchedulerMainpublic void resetNodepools()
public void processRecovery(IRmJob j)
public static org.apache.uima.ducc.common.utils.id.DuccId newId()
public static org.apache.uima.ducc.common.utils.id.DuccId newId(long id)
public void queryMachines()
queryMachines in interface ISchedulerMain
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||