public class Scheduler extends Object implements ISchedulerMain, 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| Constructor and Description |
|---|
Scheduler(org.apache.uima.ducc.common.component.AbstractDuccComponent baseComponent) |
| Modifier and Type | Method and Description |
|---|---|
int |
calcShareOrder(long mem)
Calculate share order, given some memory size in GB (as in from a job spec)
|
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) |
boolean |
mustRecover() |
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.
|
org.apache.uima.ducc.common.admin.event.RmAdminQLoadReply |
queryLoad() |
void |
queryMachines() |
org.apache.uima.ducc.common.admin.event.RmAdminQOccupancyReply |
queryOccupancy() |
boolean |
ready()
We don't accept new work or even Orchestrator state updates until "ready".
|
org.apache.uima.ducc.common.admin.event.RmAdminReply |
reconfigure() |
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 |
setInitialized(boolean v) |
void |
setJobManager(IJobManager jobmanager) |
void |
setRecovery(boolean v) |
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() |
org.apache.uima.ducc.common.admin.event.RmAdminReply |
varyoff(String[] nodes) |
org.apache.uima.ducc.common.admin.event.RmAdminReply |
varyon(String[] nodes) |
public Scheduler(org.apache.uima.ducc.common.component.AbstractDuccComponent baseComponent)
public void init()
throws Exception
init in interface ISchedulerMainExceptionpublic org.apache.uima.ducc.common.admin.event.RmAdminReply reconfigure()
reconfigure in interface ISchedulerMainpublic void setRecovery(boolean v)
setRecovery in interface ISchedulerMainpublic boolean mustRecover()
mustRecover in interface ISchedulerMainpublic boolean isInitialized()
isInitialized in interface ISchedulerMainpublic void setInitialized(boolean v)
public 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 int calcShareOrder(long mem)
calcShareOrder 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 org.apache.uima.ducc.common.admin.event.RmAdminReply varyon(String[] nodes)
varyon in interface ISchedulerMainpublic org.apache.uima.ducc.common.admin.event.RmAdminReply varyoff(String[] nodes)
varyoff in interface ISchedulerMainpublic org.apache.uima.ducc.common.admin.event.RmAdminQLoadReply queryLoad()
queryLoad in interface ISchedulerMainpublic org.apache.uima.ducc.common.admin.event.RmAdminQOccupancyReply queryOccupancy()
queryOccupancy 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 ISchedulerMainpublic 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 ISchedulerMainCopyright © 2012–2015 The Apache Software Foundation. All rights reserved.