|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tassl.workflow.resources.Resource tassl.workflow.resources.ResourceCloud
public class ResourceCloud
Field Summary |
---|
Fields inherited from class tassl.workflow.resources.Resource |
---|
identifier, keyfile, nodeList, softwareDirWorker, supportedApps, userWorker, wflNode, workerBasePropertyFile, workingDir, zone |
Constructor Summary | |
---|---|
ResourceCloud()
|
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 |
deactivateVM(java.lang.String ipVM)
|
java.util.List |
deployVMs(java.lang.String wflId,
java.lang.String stageId,
java.util.List nodePortList,
java.lang.String appname,
java.lang.Object synresource)
Deploy N VMs of type type |
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. |
java.lang.String |
getCloudScript()
|
java.lang.String |
getDefaultImageId()
|
java.lang.String |
getImageId(java.lang.String app)
Get the imageId of the custom VM image of an Application |
java.lang.String |
getProviderConfigFile()
|
java.lang.String |
getProviderType()
|
java.lang.String |
getRegion()
|
java.lang.String |
getTypebyIp(java.lang.String ipVM)
Return the type of VM that corresponds to the ip or null if not found |
java.util.List |
getVMAddressbyType(java.lang.String workflowId,
java.lang.String stageId,
java.util.List<java.lang.String> vmTypes)
Return list of addresses corresponding with VMs from those allocated to the specific stage |
java.util.HashMap<java.lang.String,java.lang.Integer> |
getVMLimits()
|
boolean |
isActive(java.lang.String ipVM)
Check if the node corresponding to this IP is active. |
boolean |
isStatusActive(java.lang.String ipVM)
Check if the machine is in active status in the records. |
boolean |
loadConfig(java.lang.String file)
|
int |
numberWorkersinVM(java.lang.String workflowId,
java.lang.String stageId,
java.lang.String ip)
Return the number of workers running in the under the same IP |
void |
printVMactive()
|
void |
printWflNode()
|
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)
Remove stage from wflnode. |
void |
restoreSite()
Restore a previously disabled site. |
void |
setCloudScript(java.lang.String cloudScript)
|
void |
setDefaultImageId(java.lang.String imageId)
|
void |
setProviderConfigFile(java.lang.String ProviderConfigFile)
|
void |
setProviderType(java.lang.String ProviderType)
|
void |
setRegion(java.lang.String region)
|
void |
setVMLimits(java.util.HashMap<java.lang.String,java.lang.Integer> VMLimits)
|
void |
terminateVMs(java.util.List VMIps)
Terminate VM calling to the IP |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceCloud()
Method Detail |
---|
public void disableSite()
Resource
disableSite
in class Resource
public void restoreSite()
Resource
restoreSite
in class Resource
public java.util.List getAvailableSlotsScheduling(java.lang.String siteAddress, java.lang.String[] allocatedWorkers)
Resource
getAvailableSlotsScheduling
in class Resource
siteAddress
- address:port of the site to be identified laterallocatedWorkers
- machine/vmtype:numWorkers
public boolean loadConfig(java.lang.String file)
public java.lang.String getProviderType()
public java.lang.String getProviderConfigFile()
public java.lang.String getDefaultImageId()
public java.lang.String getImageId(java.lang.String app)
app
-
public java.lang.String getRegion()
public java.lang.String getCloudScript()
public java.util.HashMap<java.lang.String,java.lang.Integer> getVMLimits()
public void setProviderType(java.lang.String ProviderType)
public void setProviderConfigFile(java.lang.String ProviderConfigFile)
public void setVMLimits(java.util.HashMap<java.lang.String,java.lang.Integer> VMLimits)
public void setDefaultImageId(java.lang.String imageId)
public void setRegion(java.lang.String region)
public void setCloudScript(java.lang.String cloudScript)
public java.util.List releaseWorkers(java.lang.String workflowId, java.lang.String stageId)
releaseWorkers
in class Resource
workflowId
- stageId
-
public void deactivateVM(java.lang.String ipVM)
public java.lang.String getTypebyIp(java.lang.String ipVM)
ipVM
-
public java.util.List getVMAddressbyType(java.lang.String workflowId, java.lang.String stageId, java.util.List<java.lang.String> vmTypes)
workflowId
- stageId
- vmTypes
-
public java.util.List releaseSomeWorkers(java.lang.String workflowId, java.lang.String stageId, java.util.List workers)
Resource
releaseSomeWorkers
in class Resource
public java.util.List releaseSomeWorkersbyMachineIp(java.lang.String workflowId, java.lang.String stageId, java.util.List machineIps)
releaseSomeWorkersbyMachineIp
in class Resource
workflowId
- stageId
- machineIps
-
public int numberWorkersinVM(java.lang.String workflowId, java.lang.String stageId, java.lang.String ip)
workflowId
- stageId
- ip
-
public boolean checkAllocatePossibleStage(int numWorkers, java.lang.String properties)
Resource
checkAllocatePossibleStage
in class Resource
properties
- 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 Resource
properties
- This defines the type of allocation "random" or "exact" as the list of MachineWorkers says
public void printVMactive()
public void printWflNode()
public java.util.List deployVMs(java.lang.String wflId, java.lang.String stageId, java.util.List nodePortList, java.lang.String appname, java.lang.Object synresource)
wflId
- stageId
- nodePortList
- i.e. m1.small:7777,m1.medium:7777 7778 (deploy two VMs)appname
-
public void terminateVMs(java.util.List VMIps)
VMIps
- public boolean isStatusActive(java.lang.String ipVM)
Resource
isStatusActive
in class Resource
public boolean isActive(java.lang.String ipVM)
Resource
isActive
in class Resource
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 Resource
timestamp
- 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 |