|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread tassl.application.workflow.AutonomicScheduler
public class AutonomicScheduler
Autonomic Scheduler / Resource Manager
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AutonomicScheduler(java.lang.String address,
int port,
java.lang.String wflMasterAdd,
int wflMasterPort,
int monitorInterval)
|
Method Summary | |
---|---|
protected void |
calculateCostVMs(java.lang.String wflId,
java.lang.String stageId)
|
void |
calculateNetworkSpeed()
Calculate network speed between agents. |
protected void |
cleanStagesFinalMaps(java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> wflStage_SitesDown)
When a whole site goes down, we need to remove all its workers that are allocated to each workflow stage |
protected void |
cleanStagesFinalMaps(java.util.HashMap<java.lang.String,java.lang.String> wflStage_workerTasks,
java.lang.String agentAddress,
int agentPort)
Remove workers that are allocated to each workflow stage but have been reported to be down |
protected java.util.List |
communicateAgentsScheduling(java.lang.String wflId,
WorkflowStage stage,
java.lang.String properties,
java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> finalMap,
long timestamp)
Tell each agent resources that need to provision |
protected boolean |
dealStageDone(java.lang.String wflId,
java.lang.String stageId,
java.lang.String end,
java.lang.String stagesInvolved)
Do something when a stage is Done. |
protected java.lang.String |
filesForSite(WorkflowStage stage,
java.lang.String tasks)
Get list of files that a site will need |
java.lang.String |
findPolicyClass(java.lang.String policyName)
Returns the class name that contains a policy with the name indicated in the argument or NULL if not found. |
protected void |
forceRescheduleAll()
|
protected void |
forceWorkflowReschedule(java.lang.String workflowId)
|
protected java.util.HashMap<java.lang.String,java.util.List<WorkerForScheduler>> |
getAllAvailableSlots(java.lang.String workflow,
java.lang.String stage)
Look into available resources and determine the number of slots(workers) available. |
protected java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> |
getFinalMap(java.util.HashMap<java.lang.Integer,WorkerForScheduler> MapTask,
java.lang.String stageId)
Return the number of machines and workers per site |
java.util.List |
getPolicies(java.lang.String fullclassName)
|
protected void |
initPolicyCatalog()
|
protected boolean |
rescheduleStages(java.util.HashMap<java.lang.String,java.lang.String> wflStage_workerTasks)
Report failed tasks to the workflowMaster and retrieve |
protected boolean |
RoundRobin(java.lang.String wflId,
WorkflowStage stage,
java.lang.String properties)
|
void |
run()
|
protected boolean |
schedulePendingStages()
|
protected boolean |
scheduleSingleStage(java.lang.String wflId,
WorkflowStage stage,
java.util.List<java.lang.String> nodeAcctList)
Schedule a single stage |
protected boolean |
scheduleStages(java.lang.String wflId,
java.util.List<WorkflowStage> stages)
Schedule stages of a workflow. |
boolean |
sendInfo(java.lang.String address,
int port,
java.lang.String command,
java.util.List param)
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AutonomicScheduler(java.lang.String address, int port, java.lang.String wflMasterAdd, int wflMasterPort, int monitorInterval)
Method Detail |
---|
protected final void initPolicyCatalog()
public java.util.List getPolicies(java.lang.String fullclassName)
public java.lang.String findPolicyClass(java.lang.String policyName)
policyName
-
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void forceWorkflowReschedule(java.lang.String workflowId) throws java.io.IOException
java.io.IOException
protected void forceRescheduleAll() throws java.io.IOException
java.io.IOException
protected boolean rescheduleStages(java.util.HashMap<java.lang.String,java.lang.String> wflStage_workerTasks) throws java.io.IOException
java.io.IOException
protected void cleanStagesFinalMaps(java.util.HashMap<java.lang.String,java.lang.String> wflStage_workerTasks, java.lang.String agentAddress, int agentPort)
protected void cleanStagesFinalMaps(java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> wflStage_SitesDown)
wflStage_SitesDown
- {"wkf.stage":{"site","site"},..}protected boolean dealStageDone(java.lang.String wflId, java.lang.String stageId, java.lang.String end, java.lang.String stagesInvolved)
wflId
- stageId
- end
- indicates if there are more stages in the workflow. values: "end","noend"stagesInvolved
- Stages involved. This is useful when non-blocking stages
protected void calculateCostVMs(java.lang.String wflId, java.lang.String stageId)
protected boolean schedulePendingStages()
protected boolean scheduleStages(java.lang.String wflId, java.util.List<WorkflowStage> stages)
wflId
- stages
-
protected boolean scheduleSingleStage(java.lang.String wflId, WorkflowStage stage, java.util.List<java.lang.String> nodeAcctList)
wflId
- stage
- nodeAcctList
- List of nodes and timestamps of failed nodes. Only needed for rescheduling.
protected java.util.HashMap<java.lang.String,java.util.List<WorkerForScheduler>> getAllAvailableSlots(java.lang.String workflow, java.lang.String stage)
protected java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> getFinalMap(java.util.HashMap<java.lang.Integer,WorkerForScheduler> MapTask, java.lang.String stageId)
MapTask
- Map task:slot(worker)
protected java.util.List communicateAgentsScheduling(java.lang.String wflId, WorkflowStage stage, java.lang.String properties, java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> finalMap, long timestamp)
wflId
- stage
- properties
- finalMap
-
protected java.lang.String filesForSite(WorkflowStage stage, java.lang.String tasks)
stage
- tasks
- List of tasks in the format: "taskid|taskid|taskid"
protected boolean RoundRobin(java.lang.String wflId, WorkflowStage stage, java.lang.String properties)
public boolean sendInfo(java.lang.String address, int port, java.lang.String command, java.util.List param)
public void calculateNetworkSpeed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |