|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.gridbus.broker.farming.common.FarmingEngine
|
+--org.gridbus.broker.farming.common.GridbusFarmingEngine
This class is a place holder for the jobs and the server objects and is the main interface to applications that talk to the Broker.
| Constructor Summary | |
GridbusFarmingEngine()
Constructor - initializes GridbusFarmingEngine If the BrokerProperties are not set, then it sets it up by looking at the Broker.properties file If Broker.properties is not found, then default configuration properties are used. |
|
| Method Summary | |
java.lang.String |
getAppDescriptionFile()
Returns the name of the app-description file |
java.lang.String |
getBrokerID()
|
float |
getBudget()
Returns the budget for the jobs currently scheduled / being scheduled |
State |
getCurrentState()
Returns the current state of the farming engine as a "State" object. |
java.util.Collection |
getDataFileList()
Collection of Data Files |
java.util.Hashtable |
getDataHostTable()
Collection of Data Hosts |
long |
getDeadline()
Returns the deadline for the jobs currently scheduled / being scheduled |
long |
getJobCount(int status)
|
java.util.Collection |
getJobs(int status)
Gets all the jobs with the given status from the active-set. |
java.lang.String |
getLocalDirectory()
Returns the local directory the broker, where the inputs and other job dependencies are found |
java.util.Collection |
getNextNJobs(int n)
|
java.util.Collection |
getNextNJobs(int n,
int status)
|
java.lang.String |
getResourceDescriptionFile()
Returns the name of the resource description file. |
Scheduler |
getScheduler()
|
java.util.Date |
getStartDateStamp()
|
java.lang.String |
getStats()
|
java.lang.String |
getTempDirectory()
|
long |
getTotalJobCount()
|
java.lang.String |
getUsername()
|
void |
init()
This method performs initialisation tasks for the farming engine. |
void |
initJobs()
|
void |
initResources()
|
boolean |
isFeasible()
Returns whether the current schedule is feasible or not, depending on the given budget,deadline constraints |
boolean |
isInputDataFilePresent()
True / False based on whether the input data file is present |
boolean |
isSchedulingComplete()
|
boolean |
isSchedulingFailed()
Returns if the scheduler has failed due to some reason |
boolean |
isSchedulingFinished()
Returns if all the jobs have been scheduled on the grid |
void |
schedule()
Initialises the appropriate scheduler based on the broker properties, and starts the scheduler on a seperate thread |
void |
setAppDescriptionFile(java.lang.String filename)
Sets the app-description task file name |
void |
setBudget(java.lang.String bud)
Sets the budget for the current grid-application running on the broker |
void |
setDataFileList(java.util.Collection dataFileList)
|
void |
setDataHostTable(java.util.Hashtable dataHostTable)
|
void |
setDeadline(java.lang.String date)
Sets the deadline for the current grid-application running on the broker |
void |
setFeasible(boolean b)
Sets the feasibility of the broker schedule |
void |
setLocalDirectory(java.lang.String val)
Sets the LocalDir variable within the Broker Properties. |
void |
setResourceDescriptionFile(java.lang.String s)
Sets the resource description file |
void |
setScheduler(Scheduler scheduler)
|
void |
setStartDateStamp(java.util.Date startDateStamp)
|
void |
setTempDirectory(java.lang.String tempdir)
Sets the broker's temporary directory to the specified path. |
void |
setUsername(java.lang.String username)
|
void |
store()
Saves the State to persistent storage using the specified Writer |
void |
storeJobs(java.util.Collection jobs)
Saves the jobs collection to persistent store |
void |
storeServers(java.util.Collection servers)
Saves the servers collection to persistent store |
boolean |
terminate()
Terminates the execution by stopping all the running jobs |
void |
terminateJob(java.lang.String jobID)
Terminates the job, whose identifier has been passed, if it is running |
| Methods inherited from class org.gridbus.broker.farming.common.FarmingEngine |
addJob, addServer, getJobs, getServers, setJobs, setServers |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GridbusFarmingEngine()
throws GridBrokerException
GridBrokerException| Method Detail |
public void setTempDirectory(java.lang.String tempdir)
throws GridBrokerException
tempdir -
GridBrokerException
public void init()
throws java.lang.Exception
java.lang.Exception
public void initJobs()
throws GridBrokerException
GridBrokerException
public void initResources()
throws GridBrokerException
GridBrokerExceptionpublic java.lang.String getResourceDescriptionFile()
public java.lang.String getAppDescriptionFile()
public void setResourceDescriptionFile(java.lang.String s)
s - public void setAppDescriptionFile(java.lang.String filename)
filename - of type string representing the app-description task filenamepublic boolean isInputDataFilePresent()
public java.util.Collection getDataFileList()
public java.util.Hashtable getDataHostTable()
public void schedule()
throws java.lang.Exception
java.lang.Exception
public void terminateJob(java.lang.String jobID)
throws java.lang.Exception
jobID -
java.lang.Exceptionpublic boolean terminate()
public java.lang.String getLocalDirectory()
throws GridBrokerException
GridBrokerException
public void setLocalDirectory(java.lang.String val)
throws GridBrokerException
val -
GridBrokerExceptionpublic java.lang.String getTempDirectory()
public long getDeadline()
throws GridBrokerException
GridBrokerException
public void setDeadline(java.lang.String date)
throws GridBrokerException
date - expressed in the format: dd MMM yyyy hh:mm:ss eg: 30 Dec 2010 11:34:40
GridBrokerException
public float getBudget()
throws GridBrokerException
GridBrokerException
public void setBudget(java.lang.String bud)
throws GridBrokerException
bud -
GridBrokerExceptionpublic boolean isFeasible()
public void setFeasible(boolean b)
b - public boolean isSchedulingFinished()
public boolean isSchedulingFailed()
public boolean isSchedulingComplete()
public Scheduler getScheduler()
public java.lang.String getStats()
public void setScheduler(Scheduler scheduler)
scheduler - The scheduler to set.public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username - The username to set.public java.util.Date getStartDateStamp()
public void store()
public void storeServers(java.util.Collection servers)
servers - public void storeJobs(java.util.Collection jobs)
jobs -
public State getCurrentState()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getBrokerID()
public void setStartDateStamp(java.util.Date startDateStamp)
startDateStamp - The startDateStamp to set.public void setDataFileList(java.util.Collection dataFileList)
dataFileList - The dataFileList to set.public void setDataHostTable(java.util.Hashtable dataHostTable)
dataHostTable - The dataHostTable to set.
public java.util.Collection getNextNJobs(int n)
throws GridBrokerException
n -
GridBrokerException - if the farming engine is not persistent (since ActiveSet cannot be initialized in that case)
public java.util.Collection getNextNJobs(int n,
int status)
throws GridBrokerException
n - status -
GridBrokerException - if the farming engine is not persistent (since ActiveSet cannot be initialized in that case)public long getJobCount(int status)
status -
public long getTotalJobCount()
public java.util.Collection getJobs(int status)
status -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||