|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridbus.broker.farming.common.FarmingEngine
org.gridbus.broker.farming.common.GridbusFarmingEngine
public final class 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.
| Field Summary | |
|---|---|
static int |
COMPLETED
|
static int |
READY
|
static int |
STARTED
|
static int |
UNKNOWN
|
| Constructor Summary | |
|---|---|
GridbusFarmingEngine()
Constructor - initializes GridbusFarmingEngine |
|
GridbusFarmingEngine(java.lang.Object config)
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. |
|
GridbusFarmingEngine(java.lang.Object config,
boolean initRecovery)
This constructor is called by the recovery process |
|
| Method Summary | |
|---|---|
void |
addServer(ComputeServer s)
Add a computational server to the Collection |
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 |
float |
getBudgetSpent()
|
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)
|
long |
getJobCount(int status,
java.lang.String serverID)
|
java.util.Collection |
getJobs()
|
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.Vector |
getNextNJobs(int N,
int jobStatus)
|
java.lang.String |
getPersistenceMode()
Returns the type of persistence used (ie. |
Reader |
getPersistenceReader()
|
Writer |
getPersistenceWriter()
|
BrokerProperties |
getProperties()
Returns a copy of configuration properties for the broker. |
java.lang.String |
getResourceDescriptionFile()
Returns the name of the resource description file. |
Scheduler |
getScheduler()
|
java.util.Date |
getStartDateStamp()
|
java.lang.String |
getStats()
|
int |
getStatus()
|
java.lang.String |
getStatusString()
|
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 |
boolean |
isSchedulingStarted()
|
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(float budget)
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 |
setServers(java.util.Collection servers)
|
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 |
storeJob(Job j)
|
void |
storeJobs(java.util.Vector jobs)
|
void |
storeServers(java.util.Vector servers)
|
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, getServers, setJobs |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int UNKNOWN
public static final int STARTED
public static final int COMPLETED
public static final int READY
| Constructor Detail |
|---|
public GridbusFarmingEngine()
throws GridBrokerException
GridBrokerException
public GridbusFarmingEngine(java.lang.Object config)
throws GridBrokerException
config -
GridBrokerException
public GridbusFarmingEngine(java.lang.Object config,
boolean initRecovery)
throws GridBrokerException
config - initRecovery -
GridBrokerException| Method Detail |
|---|
public BrokerProperties getProperties()
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 Reader getPersistenceReader()
public Writer getPersistenceWriter()
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(float budget)
throws GridBrokerException
budget -
GridBrokerExceptionpublic boolean isFeasible()
public void setFeasible(boolean b)
b - public boolean isSchedulingFinished()
public boolean isSchedulingFailed()
public boolean isSchedulingStarted()
public boolean isSchedulingComplete()
public Scheduler getScheduler()
public void addServer(ComputeServer s)
addServer in class FarmingEngines - - the server to be added.public void setServers(java.util.Collection servers)
setServers in class FarmingEngineservers - - Collection object of serverspublic java.lang.String getStats()
public void setScheduler(Scheduler scheduler)
throws GridBrokerException
scheduler - The scheduler to set.
GridBrokerExceptionpublic 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 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 long getJobCount(int status)
status -
public long getTotalJobCount()
public java.util.Collection getJobs(int status)
status -
public java.util.Collection getJobs()
getJobs in class FarmingEnginepublic float getBudgetSpent()
public java.lang.String getPersistenceMode()
public java.lang.String getStatusString()
public int getStatus()
public void storeServers(java.util.Vector servers)
servers - public void storeJobs(java.util.Vector jobs)
jobs - public void storeJob(Job j)
j -
public java.util.Vector getNextNJobs(int N,
int jobStatus)
N - jobStatus -
public long getJobCount(int status,
java.lang.String serverID)
status - serverID -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||