Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members

JobStatus Class Reference

#include <JobStatus.h>

List of all members.

Public Types

enum  Code {
  UNDEF = 0, SUBMITTED, WAITING, READY,
  SCHEDULED, RUNNING, DONE, CLEARED,
  ABORTED, CANCELLED, UNKNOWN, PURGED,
  CODE_MAX
}
enum  Attr {
  ACL = 0, CANCEL_REASON = 1, CANCELLING = 2, CE_NODE = 3,
  CHILDREN = 4, CHILDREN_HIST = 5, CHILDREN_NUM = 6, CHILDREN_STATES = 7,
  CONDOR_ID = 8, CONDOR_DEST_HOST = 9, CONDOR_ERROR_DESC = 10, CONDOR_JDL = 11,
  CONDOR_JOB_EXIT_STATUS = 12, CONDOR_JOB_PID = 13, CONDOR_OWNER = 14, CONDOR_PREEMPTING = 15,
  CONDOR_REASON = 16, CONDOR_SHADOW_EXIT_STATUS = 17, CONDOR_SHADOW_PID = 18, CONDOR_STARTER_EXIT_STATUS = 19,
  CONDOR_STARTER_PID = 20, CONDOR_STATUS = 21, CONDOR_UNIVERSE = 22, CPU_TIME = 23,
  DESTINATION = 24, DONE_CODE = 25, EXIT_CODE = 26, EXPECT_FROM = 27,
  EXPECT_UPDATE = 28, FAILURE_REASONS = 29, GLOBUS_ID = 30, JDL = 31,
  JOB_ID = 32, JOBTYPE = 33, LAST_UPDATE_TIME = 34, LOCAL_ID = 35,
  LOCATION = 36, MATCHED_JDL = 37, NETWORK_SERVER = 38, OWNER = 39,
  PARENT_JOB = 40, PAYLOAD_RUNNING = 41, PBS_DEST_HOST = 42, PBS_ERROR_DESC = 43,
  PBS_EXIT_STATUS = 44, PBS_NAME = 45, PBS_OWNER = 46, PBS_PID = 47,
  PBS_QUEUE = 48, PBS_REASON = 49, PBS_RESOURCE_USAGE = 50, PBS_SCHEDULER = 51,
  PBS_STATE = 52, POSSIBLE_CE_NODES = 53, POSSIBLE_DESTINATIONS = 54, REASON = 55,
  RESUBMITTED = 56, RSL = 57, SEED = 58, STATE_ENTER_TIME = 59,
  STATE_ENTER_TIMES = 60, SUBJOB_FAILED = 61, SUSPEND_REASON = 62, SUSPENDED = 63,
  UI_HOST = 65, USER_TAGS = 64, ATTR_MAX = 66
}
enum  { DONE_CODE_OK, DONE_CODE_FAILED, DONE_CODE_CANCELLED }
enum  {
  JOBTYPE_SIMPLE, JOBTYPE_DAG, JOBTYPE__PARTITIONABLE_UNUSED, JOBTYPE__PARTITIONED_UNUSED,
  JOBTYPE_COLLECTION, JOBTYPE_PBS, JOBTYPE_CONDOR
}
enum  AttrType {
  INT_T, STRING_T, TIMEVAL_T, BOOL_T,
  JOBID_T, INTLIST_T, STRLIST_T, TAGLIST_T,
  STSLIST_T
}

Public Member Functions

const std::string & name (void) const
int getValInt (Attr name) const
std::string getValString (Attr name) const
timeval getValTime (Attr name) const
const glite::wmsutils::jobid::JobId getValJobId (Attr name) const
bool getValBool (Attr name) const
const std::vector< int > getValIntList (Attr name) const
const std::vector< std::string > getValStringList (Attr name) const
const std::vector< std::pair<
std::string, std::string > > 
getValTagList (Attr name) const
const std::vector< JobStatusgetValJobStatusList (Attr name) const
const std::vector< std::pair<
Attr, AttrType > > & 
getAttrs (void) const
 JobStatus (void)
 JobStatus (const JobStatus &orig)
JobStatusoperator= (const JobStatus &orig)
 JobStatus (const edg_wll_JobStat &src)
JobStatusoperator= (const edg_wll_JobStat &src)
virtual ~JobStatus ()

Static Public Member Functions

const std::string & getAttrName (Attr name)
const std::string & getStateName (Code state)

Public Attributes

Code status

Protected Member Functions

edg_wll_JobStat * c_ptr (void)

Friends

class Job
class CountRef<JobStatus>


Detailed Description

Class representing status of job.

This class is used to represent all information about the job status as computed and stored in the bookkeeping server's database. Job status is, like Event, list of attribute -- value pairs. One of the attributes is the job's state as seen by the L&B, ie. something like RUNNING or * DONE, other attributes contain more information about the job.

The JobStatus class provides methods for reading values of these attributes and it is used as a result of server queries.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
DONE_CODE_OK  Finished correctly
DONE_CODE_FAILED  Execution failed
DONE_CODE_CANCELLED  Cancelled by user

anonymous enum
 

Enumeration values:
JOBTYPE_SIMPLE  simple job
JOBTYPE_DAG  composite job
JOBTYPE__PARTITIONABLE_UNUSED  placholder for unused code
JOBTYPE__PARTITIONED_UNUSED  placholder for unused code
JOBTYPE_COLLECTION  parent of collection of jobs
JOBTYPE_PBS  PBS job
JOBTYPE_CONDOR  Condor job

enum JobStatus::Attr
 

Symbolic names of attributes.

These constants are used for naming individual attributes when invoking their access methods.

Enumeration values:
ACL  ACL of the job
CANCEL_REASON  Reason of cancel
CANCELLING  Cancellation request in progress
CE_NODE  Worker node where the job is executed
CHILDREN  list of subjob IDs
CHILDREN_HIST  summary (histogram) of children job states
CHILDREN_NUM  number of subjobs
CHILDREN_STATES  full status information of the children
CONDOR_ID  Id within Condor-G
CONDOR_DEST_HOST  Hostname of node where job is running
CONDOR_ERROR_DESC  Glued error descriptions from error events
CONDOR_JDL  ClassAd passed to Condor-G for last job execution
CONDOR_JOB_EXIT_STATUS  Job exit status
CONDOR_JOB_PID  PID of running job
CONDOR_OWNER  Job owner
CONDOR_PREEMPTING  Job preempting
CONDOR_REASON  Glued reasons/errors leading to pending events
CONDOR_SHADOW_EXIT_STATUS  Condor shadow exit status (see h/exit.h)
CONDOR_SHADOW_PID  PID of Shadow
CONDOR_STARTER_EXIT_STATUS  Condor starter exit status
CONDOR_STARTER_PID  PID of Starter
CONDOR_STATUS  Condor job status
CONDOR_UNIVERSE  Condor job Universe (in job ClassAds)
CPU_TIME  Consumed CPU time
DESTINATION  ID of CE where the job is being sent
DONE_CODE  Return code
EXIT_CODE  Unix exit code
EXPECT_FROM  Sources of the missing information
EXPECT_UPDATE  Some logged information has not arrived yet
FAILURE_REASONS  Concatenated job failure reasons, possibly from deeper middleware layers
GLOBUS_ID  Globus allocated Id
JDL  User submitted job description
JOB_ID  Id of the job
JOBTYPE  Type of job
LAST_UPDATE_TIME  Last known event of the job
LOCAL_ID  Id within LRMS
LOCATION  Where the job is being processed
MATCHED_JDL  Full job description after matchmaking
NETWORK_SERVER  Network server handling the job
OWNER  Job owner
PARENT_JOB  parent job of subjob
PAYLOAD_RUNNING  User payload started
PBS_DEST_HOST  Hostname of node where job is running
PBS_ERROR_DESC  Glued error descriptions from error events
PBS_EXIT_STATUS  Job exit status
PBS_NAME  Name of job
PBS_OWNER  Owner of job
PBS_PID  PID of running job
PBS_QUEUE  Name of queue in which is job queued
PBS_REASON  Glued reasons/errors leading to pending events
PBS_RESOURCE_USAGE  Glued resource usage
PBS_SCHEDULER  Name of pbs scheduler
PBS_STATE  Job state which would probably return PBS qstat (Q/R/C/....)
POSSIBLE_CE_NODES  CE nodes matching to possible_destinations
POSSIBLE_DESTINATIONS  Possible job destinations
REASON  Reason of being in this status, if any
RESUBMITTED  The job was resubmitted
RSL  Job RSL sent to Globus
SEED  string used for generation of subjob IDs
STATE_ENTER_TIME  When entered this status
STATE_ENTER_TIMES  When all previous states were entered
SUBJOB_FAILED  Subjob failed (the parent job will fail too)
SUSPEND_REASON  Reason for the suspend
SUSPENDED  Job is suspended
UI_HOST  Hostname or address of UI used to submit the job
USER_TAGS  List of pairs (user_tag, user_value)
ATTR_MAX  Limit for range checking.

enum JobStatus::AttrType
 

Symbolic names of attribute types.

These constants are used to name the various attribute types.

Enumeration values:
INT_T  Integer type.
STRING_T  String type.
TIMEVAL_T  struct timeval type.
BOOL_T  Boolean type (true or false).
JOBID_T  Job id type.
INTLIST_T  List of integer values.
STRLIST_T  List of string values.
TAGLIST_T  List of user tags.
STSLIST_T  List of states.

enum JobStatus::Code
 

Symbolic names of job states.

Enumeration values:
UNDEF  Indicates invalid, i.e. uninitialized instance.
SUBMITTED  Entered by the user to the User Interface or registered by Job Partitioner.
WAITING  Accepted by WMS, waiting for resource allocation.
READY  Matching resources found.
SCHEDULED  Accepted by LRMS queue.
RUNNING  Executable is running.
DONE  Execution finished, output is available.
CLEARED  Output transfered back to user and freed.
ABORTED  Aborted by system (at any stage).
CANCELLED  Cancelled by user.
UNKNOWN  Status cannot be determined.
PURGED  Job has been purged from bookkeeping server (for LB->RGMA interface).
CODE_MAX  Limit for range checking.


Constructor & Destructor Documentation

JobStatus::JobStatus void   ) 
 

Default constructor.

Initializes an empty instance.

JobStatus::JobStatus const JobStatus orig  ) 
 

Copy constructor.

Creates identical copy of the original object. The underlying C struct edg_wll_JobStatus is shared using the CountRef mechanism.

Parameters:
[in] orig Original.

JobStatus::JobStatus const edg_wll_JobStat &  src  ) 
 

Constructor from the C type.

Encapsulates the given struct.

Parameters:
[in] src C struct that holds the status.

virtual JobStatus::~JobStatus  )  [virtual]
 

Destructor.

Releases the encapsulated C struct.


Member Function Documentation

edg_wll_JobStat* JobStatus::c_ptr void   )  [protected]
 

const std::string& JobStatus::getAttrName Attr  name  )  [static]
 

Get name of attribute.

Retrieve string representation of symbolic name of attribute.

Parameters:
[in] name Symbolic name of attribute.
Returns:
Name of attribute.
Exceptions:
LoggingException Invalid attribute name.

const std::vector<std::pair<Attr,AttrType> >& JobStatus::getAttrs void   )  const
 

List of attributes and their types valid for this instance.

Returns the vector of (attribute, attribute type) pairs that this instance of JobStatus contains.

Returns:
List of attributes.

const std::string& JobStatus::getStateName Code  state  )  [static]
 

Get name of state.

Retrieve string representation of symbolic job state.

Parameters:
[in] state Symbolic state name.
Returns:
String state name.
Exceptions:
Exception Invalid state.

bool JobStatus::getValBool Attr  name  )  const
 

Access method for attribute values.

Retrieve bool value of named attribute.

Parameters:
[in] name Symbolic name of attribute.
Returns:
Value of attribute.
Exceptions:
LoggingException Invalid attribute name.

int JobStatus::getValInt Attr  name  )  const
 

Access method for attribute values.

Retrieve integer value of named attribute.

Parameters:
[in] name Symbolic name of attribute.
Returns:
Value of attribute.
Exceptions:
LoggingException Invalid attribute name.

const std::vector<int> JobStatus::getValIntList Attr  name  )  const
 

Access method for attribute values.

Retrieve integer values of named attribute.

Parameters:
[in] name Symbolic name of attribute.
Returns:
Value of attribute.
Exceptions:
LoggingException Invalid attribute name.

const glite::wmsutils::jobid::JobId JobStatus::getValJobId Attr  name  )  const
 

Access method for attribute values.

Retrieve JobId value of named attribute.

Parameters:
[in] name Symbolic name of attribute.
Returns:
Value of attribute.
Exceptions:
LoggingException Invalid attribute name.

const std::vector<JobStatus> JobStatus::getValJobStatusList Attr  name  )  const
 

Access method for attribute values.

Retrieve status values of named attribute.

Parameters:
[in] name Symbolic name of attribute.
Returns:
Value of attribute.
Exceptions:
LoggingException Invalid attribute name.

std::string JobStatus::getValString Attr  name  )  const
 

Access method for attribute values.

Retrieve string value of named attribute.

Parameters:
[in] name Symbolic name of attribute.
Returns:
Value of attribute.
Exceptions:
LoggingException Invalid attribute name.

const std::vector<std::string> JobStatus::getValStringList Attr  name  )  const
 

Access method for attribute values.

Retrieve string values of named attribute.

Parameters:
[in] name Symbolic name of attribute.
Returns:
Value of attribute.
Exceptions:
LoggingException Invalid attribute name.

const std::vector<std::pair<std::string,std::string> > JobStatus::getValTagList Attr  name  )  const
 

Access method for attribute values.

Retrieve user tags values of named attribute.

Parameters:
[in] name Symbolic name of attribute.
Returns:
Value of attribute.
Exceptions:
LoggingException Invalid attribute name.

struct timeval JobStatus::getValTime Attr  name  )  const
 

Access method for attribute values.

Retrieve struct timeval value of named attribute.

Parameters:
[in] name Symbolic name of attribute.
Returns:
Value of attribute.
Exceptions:
LoggingException Invalid attribute name.

const std::string& JobStatus::name void   )  const
 

Get state name.

Returns string representation of the job's state.

JobStatus& JobStatus::operator= const edg_wll_JobStat &  src  ) 
 

Assignment from the C type.

Encapsulates the given struct.

Parameters:
[in] src C struct that holds the status.

JobStatus& JobStatus::operator= const JobStatus orig  ) 
 

Assignment operator.

Creates identical copy of the original object. The underlying C struct edg_wll_JobStatus is shared using the CountRef mechanism.

Parameters:
[in] orig Original.


Friends And Related Function Documentation

friend class CountRef<JobStatus> [friend]
 

friend class Job [friend]
 


Member Data Documentation

Code JobStatus::status
 

Numeric status code.

This code represents the state of the job.

See also:
Code.


The documentation for this class was generated from the following file:
Generated on Mon May 5 15:16:55 2008 for Glite LB Client: CPP - Interface by  doxygen 1.3.9.1