A class to access a specific record in the job database.
A Job instance is always a snapshot of the job record at a specific
point in time. It is only updated when the readAgain method is explicitly invoked.
Not all of these attributes are always present. Their presence can be
checked with hasattr(), and a full list of the available attributes for a
specific Job object can be retrieved with the keys() method.
WARNING: To instantiate a Job object, the Job Database in which it is
stored must be accessible from the current process. For example, when a
Windows workflow is submitted to a Linux machine, any children that it
spawns can not access their parent's job record, because the home
directory isn't shared.
|
__init__(self,
job_id,
username="",
file=None,
launch_output=None,
launch_error=None,
handle=None,
manage_handle=True)
Initialize a read-only Job object. |
|
|
|
_cleanup(self)
Force a cleanup of mmjob resources at a specific time. |
|
|
|
|
|
_setAttributes(self)
Explicitly set attributes instead of relying on __getattr__. |
|
|
|
keys(self)
Return a list of keys present in the last read of the job control
record. |
|
|
|
get(self,
name,
default=None)
Return the last read value of a job control key. |
|
|
|
__getattr__(self,
name)
Return the last read value of a job control key. |
|
|
|
writeFile(self,
filename=None)
Writes the job record to a file. |
|
|
|
isComplete(self)
Returns True if the job is complete. |
|
|
|
isQueued(self)
Returns True if the job a batch queue job or grid job. |
|
|
|
succeeded(self)
Returns False if the job was killed, died or fizzled. |
|
|
|
setStatusIncorporated(self)
Set the status of the job to "incorporated" if the job has
completed. |
|
|
|
sendMessage(self,
msg)
Send an arbitrary text message to the job's jmonitor process. |
|
|
|
kill(self)
Kill the job if it is running. |
|
|
|
wait(self,
max_interval=60)
Wait for the job to complete; sleeping up to 'interval' seconds
between each database check. |
|
|
|
__repr__(self)
Returns the formal string representation of the Job object. |
|
|
|
summary(self)
Return a string summarizing all current Job attributes. |
|
|
|
getDuration(self)
Returns the wallclock time of the job if it is complete. |
|
|
|
_getStatus(self)
Get the Status of the job. |
|
|
|
Status(self)
Get the Status of the job. |
|
|
|
_getExitStatus(self)
Get the ExitStatus of the job. |
|
|
|
ExitStatus(self)
Get the ExitStatus of the job. |
|
|
|
getApplicationHeaderFields(self,
default=None)
@return:
An OrderedDict of essential jobcontrol keyword:value pairs
used to standardize application log files. |
|
|
|
getApplicationHeaderString(self,
field_sep=' : ')
@return:
A string of essential jobcontrol parameters, in a
preferred order, with simple formatting. |
|
|
|
getInputFiles(self)
Get list of InputFiles and Transfers marked for input |
|
|
|
InputFiles(self)
Get list of InputFiles and Transfers marked for input |
|
|
|
getOutputFiles(self)
Get list of OutputFiles and Transfers marked for output |
|
|
|
OutputFiles(self)
Get list of OutputFiles and Transfers marked for output |
|
|
|
|
|
getProgressAsSteps(self)
Get the value of backend job progress in terms of steps and
totalsteps. |
|
|
|
|
|
purgeRecord(self)
Purge the job record for the job from the database. |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|