|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gridbus.broker.farming.common.Job
public class Job
This class represents a Job. A job consists of the Task from which it was derived, a Hashtable of the variable values for this job, a status string
| Field Summary | |
|---|---|
static int |
ACTIVE
Job is active/executing on the remote node |
static int |
DONE
Job is completed. |
static int |
FAILED
Job has failed. |
static int |
LOCAL_QUEUED
Job is waiting on the local broker node, to be submitted to the remote node |
static int |
PENDING
Job is submitted, but waiting on the remote node. |
static int |
PRESTAGE
Job is waiting on the local broker node, for files to be pre-staged to the remote node. |
static int |
STAGE_IN
|
static int |
STAGE_OUT
|
static int |
STATUS_ANY
Used to indicate ANY/ALL status |
static int |
SUBMITTED
Job is submitted on the remote node |
static int |
TYPE_NORMAL
Used for all normal jobs |
static int |
TYPE_SYSTEM
Used for probe jobs to discover queues,verify requirements on a server etc. |
static int |
UNKNOWN
Job status is not known |
static int |
UNSUBMITTED
Job is waiting on the remote node, to be submitted |
| Constructor Summary | |
|---|---|
Job()
Constructor |
|
Job(java.lang.String jobID)
Constructor - with unique job id passed as a parameter. |
|
| Method Summary | |
|---|---|
void |
addVariable(SingleVariable var)
Add a Variable to the variables list |
void |
clearVariables()
Clear the variable list for this job |
long |
getJobCompletedTime()
|
java.lang.String |
getJobCompletedTimestamp()
Returns the timestamp for job completion in the format "dd/MM/yyyy hh:mm:ss" |
java.lang.String |
getJobError()
Returns the job error |
java.lang.String |
getJobErrorFileName()
Returns the name of the stderr filename for this job |
java.lang.Object |
getJobHandle()
Get the unique handle for the job (middleware-dependent) |
java.lang.String |
getJobID()
Returns the Identification String for this job |
java.lang.String |
getJobOutput()
Returns the job output |
java.lang.String |
getJobOutputFileName()
Returns the name of the stdout filename for this job |
JobRequirement |
getJobRequirement()
|
int |
getJobStatus()
Returns the integer value of the job status. |
long |
getJobSubmittedTime()
|
java.lang.String |
getJobSubmittedTimestamp()
Returns the timestamp for job submission in the format "dd/MM/yyyy hh:mm:ss" |
JobWrapper |
getJobWrapper()
Returns the Job Wrapper for this job. |
Job |
getPostProcessJob()
|
JobQueue |
getQueue()
|
java.lang.String |
getRemoteDir()
|
Requirement |
getRequirement()
|
ComputeServer |
getServer()
Returns the server to which the job is allocated |
java.lang.String |
getStatusString()
Returns the status in the form of a string. |
java.lang.Object |
getSubmitRecord()
Returns the submit record object |
Task |
getTask()
Task is the sequence of commands that describe what a job has to do. |
int |
getType()
|
java.util.Hashtable |
getVariableTable()
Returns the hashtable containing variables and their values for this job. |
java.lang.String |
getVariableValue(java.lang.String name)
returns the value of the variable name passed. |
java.util.Hashtable |
getVariableValueTable()
Returns the table of variables(values) |
void |
removeVariable(SingleVariable var)
Remove the variable name passed and its corresponding values from the list of variables |
void |
reset()
Resets the job status to UNSUBMITTED and sets the server to null. |
long |
returnWallClockTimeTaken()
This function returns the difference between the job completed timestamp and the job submitted timestamp |
void |
setJobCompletedTime(long jobCompletedTime)
|
void |
setJobCompletedTimestamp()
This function sets a time stamp in the format DateFormat.MEDIUM,DateFormat.MEDIUM It should be called after the job completion. |
void |
setJobCompletedTimestamp(java.lang.String string)
Sets the job completed timestamp as the one that is passed as the parameter. |
void |
setJobErrorFileName(java.lang.String jobErrorFileName)
|
void |
setJobHandle(java.lang.Object obj)
Sets the unique handle for the job which comes from the middleware. |
void |
setJobID(java.lang.String jobID)
Sets the job identifier |
void |
setJobOutputFileName(java.lang.String jobOutputFileName)
|
void |
setJobRequirement(JobRequirement jobReq)
|
void |
setJobStatus(int status)
Sets the job status |
void |
setJobStatus(java.lang.String status)
Sets the job status |
void |
setJobSubmittedTime(long jobSubmittedTime)
|
void |
setJobSubmittedTimestamp()
This function sets a time stamp in the format "MMM dd, yyyy hh:mm:ss" using DateFormat classes |
void |
setJobSubmittedTimestamp(java.lang.String string)
Sets the job submitted timestamp as the one that is passed as the parameter. |
void |
setJobWrapper(JobWrapper wrapper)
Sets the job wrapper for this job, to take care of submission, etc.. |
void |
setPostProcessJob(Job postjob)
|
void |
setQueue(JobQueue queue)
|
void |
setRemoteDir(java.lang.String remoteDir)
|
void |
setRequirement(Requirement jobRequirements)
|
void |
setServer(ComputeServer server)
Sets the server to which the job is to be allocated. |
void |
setSubmitRecord(java.lang.Object object)
Sets the submit record object |
void |
setTask(Task task)
This sets the task for this job |
void |
setType(int type)
|
void |
setVariableTable(java.util.Hashtable hashtable)
The variable values for the job are stord in a hashtable in the form of name value pairs This function passes a hashtable to be used as the variable storage.. |
static int |
statusInt(java.lang.String jobStatus)
Returns an integer representation of the status corresponding to the given string. |
static java.lang.String |
statusString(int jobStatus)
This method converts the input integer job status code to string format. |
void |
terminate()
Terminates this job |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int STATUS_ANY
public static final int UNKNOWN
public static final int UNSUBMITTED
public static final int SUBMITTED
public static final int ACTIVE
public static final int PENDING
public static final int DONE
public static final int FAILED
public static final int LOCAL_QUEUED
public static final int PRESTAGE
public static final int STAGE_IN
public static final int STAGE_OUT
public static final int TYPE_SYSTEM
public static final int TYPE_NORMAL
| Constructor Detail |
|---|
public Job()
public Job(java.lang.String jobID)
jobID - | Method Detail |
|---|
public static java.lang.String statusString(int jobStatus)
jobStatus -
public static int statusInt(java.lang.String jobStatus)
jobStatus -
public java.lang.String getJobID()
public void setJobID(java.lang.String jobID)
jobID - public ComputeServer getServer()
public void setServer(ComputeServer server)
server - public void setJobSubmittedTimestamp()
It should be called after the job submission.
public void setJobSubmittedTimestamp(java.lang.String string)
throws java.text.ParseException
string -
java.text.ParseException - if the string passed in cannot be converted into a valid datepublic void setJobCompletedTimestamp()
public void setJobCompletedTimestamp(java.lang.String string)
throws java.text.ParseException
string -
java.text.ParseException - if the string passed in cannot be converted into a valid datepublic long returnWallClockTimeTaken()
public java.lang.String getJobSubmittedTimestamp()
DateFormatpublic java.lang.String getJobCompletedTimestamp()
DateFormatpublic int getJobStatus()
public void setJobStatus(int status)
status - public void setJobStatus(java.lang.String status)
status - public java.lang.String getStatusString()
public JobWrapper getJobWrapper()
public Task getTask()
public void setTask(Task task)
task - public java.util.Hashtable getVariableTable()
public void setVariableTable(java.util.Hashtable hashtable)
hashtable - public void addVariable(SingleVariable var)
var - - a Variable object which contains the variable name and the variable valuepublic java.lang.String getVariableValue(java.lang.String name)
name -
public java.util.Hashtable getVariableValueTable()
public void removeVariable(SingleVariable var)
var - public void clearVariables()
public void setJobWrapper(JobWrapper wrapper)
wrapper - public void terminate()
public java.lang.Object getJobHandle()
public void setJobHandle(java.lang.Object obj)
obj - public java.lang.String getJobError()
public void setJobErrorFileName(java.lang.String jobErrorFileName)
jobErrorFileName - The jobErrorFileName to set.public java.lang.String getJobErrorFileName()
public void setJobOutputFileName(java.lang.String jobOutputFileName)
jobOutputFileName - The jobOutputFileName to set.public java.lang.String getJobOutputFileName()
public java.lang.String getJobOutput()
public java.lang.Object getSubmitRecord()
public void setSubmitRecord(java.lang.Object object)
object - - submit recordpublic java.lang.String getRemoteDir()
public void setRemoteDir(java.lang.String remoteDir)
remoteDir - The remoteDir to set.public int getType()
public void setType(int type)
type - public JobQueue getQueue()
public void setQueue(JobQueue queue)
queue - public void setRequirement(Requirement jobRequirements)
jobRequirements - public Requirement getRequirement()
public long getJobCompletedTime()
public void setJobCompletedTime(long jobCompletedTime)
jobCompletedTime - The jobCompletedTime to set.public long getJobSubmittedTime()
public void setJobSubmittedTime(long jobSubmittedTime)
jobSubmittedTime - The jobSubmittedTime to set.public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public void reset()
public void setJobRequirement(JobRequirement jobReq)
jobReq - public JobRequirement getJobRequirement()
public void setPostProcessJob(Job postjob)
postjob - public Job getPostProcessJob()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||