|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttassl.workflow.resources.Resource
tassl.workflow.resources.ResourceCluster
public class ResourceCluster
| Field Summary |
|---|
| Fields inherited from class tassl.workflow.resources.Resource |
|---|
identifier, keyfile, nodeList, softwareDirWorker, supportedApps, userWorker, wflNode, workerBasePropertyFile, workingDir, zone |
| Constructor Summary | |
|---|---|
ResourceCluster()
|
|
| Method Summary | |
|---|---|
java.util.List |
allocateStage(java.lang.String wflId,
java.lang.String stageId,
java.util.List<java.lang.String> MachineWorkers,
java.lang.String properties)
Allocate N workers to a specific stage. |
boolean |
checkAllocatePossibleStage(int numWorkers,
java.lang.String properties)
Check if the stage can be allocated in this resource |
void |
disableMachine(java.lang.String ip)
Disable Machine so it cannot be used. |
void |
disableSite()
Disable a site by setting all resources to 0 and terminate currently running workers/VMs. |
java.util.List<NodeAcct> |
generateAccountingInfo(java.lang.String wflId,
java.lang.String stageId,
long timestamp,
java.util.List<NodeAcct> currentNodeAcct)
Generate the accounting information of a stage. |
java.util.List |
getAvailableSlotsScheduling(java.lang.String siteAddress,
java.lang.String[] allocatedWorkers)
It creates the list of available slots for scheduling considering the workers per machine and the number of available machines. |
int |
getNumberActiveWorkers(java.lang.String ip)
|
boolean |
isActive(java.lang.String ip)
Check if the node corresponding to this IP is active. |
boolean |
isStatusActive(java.lang.String ip)
Check if the machine is in active status in the records. |
boolean |
loadConfig(java.lang.String file)
|
java.util.List |
releaseSomeWorkers(java.lang.String workflowId,
java.lang.String stageId,
java.util.List workers)
Release SOME workers allocated to the specific workflow stage |
java.util.List |
releaseSomeWorkersbyMachineIp(java.lang.String workflowId,
java.lang.String stageId,
java.util.List machineIps)
Release all workers of the selected machines |
java.util.List |
releaseWorkers(java.lang.String workflowId,
java.lang.String stageId)
Free workers and remove the stage from wflNode |
void |
restoreSite()
Restore a previously disabled site. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceCluster()
| Method Detail |
|---|
public boolean loadConfig(java.lang.String file)
public void disableSite()
Resource
disableSite in class Resourcepublic void restoreSite()
Resource
restoreSite in class Resource
public java.util.List releaseWorkers(java.lang.String workflowId,
java.lang.String stageId)
releaseWorkers in class ResourceworkflowId - stageId -
public java.util.List releaseSomeWorkers(java.lang.String workflowId,
java.lang.String stageId,
java.util.List workers)
Resource
releaseSomeWorkers in class Resourcepublic int getNumberActiveWorkers(java.lang.String ip)
public java.util.List releaseSomeWorkersbyMachineIp(java.lang.String workflowId,
java.lang.String stageId,
java.util.List machineIps)
releaseSomeWorkersbyMachineIp in class ResourceworkflowId - stageId - machineIps -
public boolean checkAllocatePossibleStage(int numWorkers,
java.lang.String properties)
Resource
checkAllocatePossibleStage in class Resourceproperties - This can be the type of VM we want, the min performance of a machine, etc..
public java.util.List allocateStage(java.lang.String wflId,
java.lang.String stageId,
java.util.List<java.lang.String> MachineWorkers,
java.lang.String properties)
Resource
allocateStage in class Resourceproperties - This defines the type of allocation "random" or "exact" as the list of MachineWorkers says
public boolean isStatusActive(java.lang.String ip)
Resource
isStatusActive in class Resourcepublic boolean isActive(java.lang.String ip)
Resource
isActive in class Resourcepublic void disableMachine(java.lang.String ip)
ip -
public java.util.List getAvailableSlotsScheduling(java.lang.String siteAddress,
java.lang.String[] allocatedWorkers)
Resource
getAvailableSlotsScheduling in class ResourcesiteAddress - address:port of the site to be identified laterallocatedWorkers - machine/vmtype:numWorkers
public java.util.List<NodeAcct> generateAccountingInfo(java.lang.String wflId,
java.lang.String stageId,
long timestamp,
java.util.List<NodeAcct> currentNodeAcct)
Resource
generateAccountingInfo in class Resourcetimestamp - time when the machine is provisionedcurrentNodeAcct - this is the accounting info before the new workers are assigned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||