tassl.application.cometcloud
Class AgentResourceManager
java.lang.Object
java.lang.Thread
tassl.application.cometcloud.AgentResourceManager
- All Implemented Interfaces:
- java.lang.Runnable
public class AgentResourceManager
- extends java.lang.Thread
Nested classes/interfaces inherited from class java.lang.Thread |
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary |
void |
dealDownNodes(java.util.HashMap<java.lang.String,java.util.List> downnodes,
long currentTimeStamp)
Notify Autonomic Scheduler/Resource Manager about failed workers and updates the resources object
sync outside because it modifies resources |
Resource |
getResources()
|
boolean |
loadProperties(java.lang.String res)
|
void |
releaseOneDoneWorker(java.lang.String worker,
java.lang.String workflowId,
java.lang.String stageId)
|
void |
releaseResource(java.lang.String oneworker,
java.lang.String workflowId,
java.lang.String stageId,
java.util.List<NodeAcct> nodeAcctList,
java.util.List<java.lang.String> workersNamesforAS,
java.util.List<NodeAcct> nodeAcctListRemove)
|
NodeAcct |
removeNodeAcct(java.lang.String ip,
java.util.List<NodeAcct> nodeAcctList)
|
void |
run()
|
void |
setMonitorInterval(int monitorInterval)
|
void |
setPublicIp(java.lang.String publicIp)
|
void |
setResources(Resource resources)
|
void |
setSshTunnelAgentPortRange(int[] portRange)
|
void |
setStartSSHtunnelAgent(boolean value)
|
void |
setStartSSHtunnels(boolean value)
|
void |
setWorkerBaseProperties(java.lang.String workerBaseProperties)
|
void |
updateWorkersTasksQuery(java.lang.String wflId,
java.lang.String stageId,
java.lang.String Tasks)
Update the list of tasks that workers can request |
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 |
AgentResourceManager
public AgentResourceManager(int port,
java.lang.String cmsaddress,
int cmsport,
AgentLite agent)
loadProperties
public boolean loadProperties(java.lang.String res)
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
- Overrides:
run
in class java.lang.Thread
updateWorkersTasksQuery
public void updateWorkersTasksQuery(java.lang.String wflId,
java.lang.String stageId,
java.lang.String Tasks)
- Update the list of tasks that workers can request
- Parameters:
wflId
- stageId
- Tasks
-
setMonitorInterval
public void setMonitorInterval(int monitorInterval)
setPublicIp
public void setPublicIp(java.lang.String publicIp)
setStartSSHtunnels
public void setStartSSHtunnels(boolean value)
setStartSSHtunnelAgent
public void setStartSSHtunnelAgent(boolean value)
setSshTunnelAgentPortRange
public void setSshTunnelAgentPortRange(int[] portRange)
getResources
public Resource getResources()
setResources
public void setResources(Resource resources)
setWorkerBaseProperties
public void setWorkerBaseProperties(java.lang.String workerBaseProperties)
removeNodeAcct
public NodeAcct removeNodeAcct(java.lang.String ip,
java.util.List<NodeAcct> nodeAcctList)
dealDownNodes
public void dealDownNodes(java.util.HashMap<java.lang.String,java.util.List> downnodes,
long currentTimeStamp)
- Notify Autonomic Scheduler/Resource Manager about failed workers and updates the resources object
sync outside because it modifies resources
- Parameters:
downnodes
- currentTimeStamp
- this is used only when there is a failure in provisioning
releaseOneDoneWorker
public void releaseOneDoneWorker(java.lang.String worker,
java.lang.String workflowId,
java.lang.String stageId)
releaseResource
public void releaseResource(java.lang.String oneworker,
java.lang.String workflowId,
java.lang.String stageId,
java.util.List<NodeAcct> nodeAcctList,
java.util.List<java.lang.String> workersNamesforAS,
java.util.List<NodeAcct> nodeAcctListRemove)