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

Event Class Reference

#include <Event.h>

List of all members.

Public Types

enum  Type {
  UNDEF = 0, TRANSFER, ACCEPTED, REFUSED,
  ENQUEUED, DEQUEUED, HELPERCALL, HELPERRETURN,
  RUNNING, RESUBMISSION, DONE, CANCEL,
  ABORT, CLEAR, PURGE, MATCH,
  PENDING, REGJOB, CHKPT, LISTENER,
  CURDESCR, USERTAG, CHANGEACL, NOTIFICATION,
  RESOURCEUSAGE, REALLYRUNNING, SUSPEND, RESUME,
  COLLECTIONSTATE, PBSQUEUED, PBSMATCH, PBSPENDING,
  PBSRUN, PBSRERUN, PBSDONE, PBSDEQUEUED,
  PBSRESOURCEUSAGE, PBSERROR, CONDORMATCH, CONDORREJECT,
  CONDORRUN, CONDORCHKPT, CONDOREVICT, CONDORTERMINATE,
  CONDORABORT, CONDORSUSPEND, CONDORUNSUSPEND, CONDORHOLD,
  CONDORRELEASE, CONDORNODEEXECUTE, CONDORNODETERMINATE, CONDORPOSTSCTIPTTERMINATE,
  CONDORGLOBUSSUBMIT, CONDORGLOBUSRESOURCE, TYPE_MAX
}
enum  Attr {
  ARRIVED, CHILD, CHILD_EVENT, CLASSAD,
  CONDOR_ID, DESCR, DEST_HOST, DEST_ID,
  DEST_INSTANCE, DEST_JOBID, DEST_PORT, DESTINATION,
  DONE_CODE, ERROR_DESC, EXIT_CODE, EXIT_STATUS,
  FROM, FROM_HOST, FROM_INSTANCE, HELPER_NAME,
  HELPER_PARAMS, HISTOGRAM, HOST, INFO,
  JDL, JOB, JOBID, JOBSTAT,
  JOBTYPE, LEVEL, LOCAL_JOBID, MATCHED_HOST,
  NAME, NODE, NOTIFID, NS,
  NSUBJOBS, OPERATION, OWNER, PARENT,
  PERMISSION, PERMISSION_TYPE, PID, PREEMPTING,
  PRIORITY, QUANTITY, QUEUE, REASON,
  RESOURCE, RESULT, RETVAL, SCHEDULER,
  SEED, SEQCODE, SHADOW_EXIT_STATUS, SOURCE,
  SRC_INSTANCE, SRC_ROLE, STATE, STATUS_CODE,
  SVC_HOST, SVC_NAME, SVC_PORT, TAG,
  TIMESTAMP, UNIT, UNIVERSE, USAGE,
  USER, USER_ID, USER_ID_TYPE, VALUE,
  WN_SEQ, ATTR_MAX
}
enum  ClearCode { CLEAR_USER, CLEAR_TIMEOUT, CLEAR_NOOUTPUT }
enum  EnQueuedCode { ENQUEUED_START, ENQUEUED_OK, ENQUEUED_REFUSED, ENQUEUED_FAIL }
enum  ResubmissionCode { RESUBMISSION_WILLRESUB, RESUBMISSION_WONTRESUB, RESUBMISSION_SHALLOW }
enum  TransferCode { TRANSFER_START, TRANSFER_OK, TRANSFER_REFUSED, TRANSFER_FAIL }
enum  CondorRejectCode { CONDORREJECT_NOMATCH, CONDORREJECT_OTHER }
enum  CancelCode { CANCEL_REQ, CANCEL_REFUSE, CANCEL_DONE, CANCEL_ABORT }
enum  CondorGlobusSubmitCode { CONDORGLOBUSSUBMIT_OK, CONDORGLOBUSSUBMIT_FAIL }
enum  DoneCode { DONE_OK, DONE_FAILED, DONE_CANCELLED }
enum  CondorGlobusResourceCode { CONDORGLOBUSRESOURCE_UP, CONDORGLOBUSRESOURCE_DOWN }
enum  RegJobCode {
  REGJOB_SIMPLE, REGJOB_DAG, REGJOB_PARTITIONABLE, REGJOB_PARTITIONED,
  REGJOB_COLLECTION, REGJOB_PBS, REGJOB_CONDOR
}
enum  PBSResourceUsageCode { PBSRESOURCEUSAGE_REQUESTED, PBSRESOURCEUSAGE_USED }
enum  HelperCallCode { HELPERCALL_CALLING, HELPERCALL_CALLED }
enum  HelperReturnCode { HELPERRETURN_CALLING, HELPERRETURN_CALLED }
enum  AttrType {
  INT_T, STRING_T, TIMEVAL_T, PORT_T,
  LOGSRC_T, JOBID_T, NOTIFID_T, FLOAT_T,
  DOUBLE_T
}

Public Member Functions

 Event (void)
 Event (edg_wll_Event *)
 Event (const Event &)
 ~Event (void)
Eventoperator= (const Event &)
const std::string & name (void) const
int getValInt (Attr name) const
float getValFloat (Attr name) const
double getValDouble (Attr name) const
std::string getValString (Attr name) const
timeval getValTime (Attr name) const
const glite::wmsutils::jobid::JobId getValJobId (Attr name) const
const std::vector< std::pair<
Attr, AttrType > > & 
getAttrs (void) const

Static Public Member Functions

const std::string & getAttrName (Attr name)
const std::string getEventName (Type type)

Public Attributes

Type type

Friends

class Job
class ServerConnection
class CountRef<Event>


Detailed Description

Class representing one event in the L&B database.

This class represents a L&B event, which is basically list of attribute -- value pairs. For each particular event type (returned by name()) there is a list of allowed attributes (returned by getAttrs()). The Event class provides methods for reading these attributes, but no means of changing the event are provided; this class is used as a result of L&B queries.


Member Enumeration Documentation

enum Event::Attr
 

Event attribute symbolic identifier. These symbols provide symbolic names for event attributes. In braces are shown the event types for which the attribute is defined, for each event type the attribute meaning is described.

Enumeration values:
ARRIVED 
[common] Time the event was stored into the bookkeeping server database.
CHILD 
[CollectionState] JobId of subjob, which triggered the state change.
CHILD_EVENT 
[CollectionState] Event which triggered the state change.
CLASSAD 
[Chkpt] Application specific checkpoint value.
CONDOR_ID 
[CondorRun] Condor ID
DESCR 
[CurDescr] Description of the current job transformation (output of the helper).
DEST_HOST 
[CondorRun] Where to run the job
[Notification] Hostname the notification is sent to.
[PBSMatch] Aka exec_host
[PBSRun] Where to run the job
[Transfer] Hostname of server that takes over control of the job.
DEST_ID 
[Match] Identification of the queue on the CE that the job could be send to.
DEST_INSTANCE 
[Transfer] Service (instance) that takes over control of the job.
DEST_JOBID 
[Transfer] Job id as assigned by the receiving software component.
DEST_PORT 
[Notification] Port number the notification is sent to.
DESTINATION 
[Transfer] Destination where the job is being transfered to.
DONE_CODE 
[CollectionState] In case of (state == Done) contains done code
ERROR_DESC 
[PBSError] Error reason
EXIT_CODE 
[Done] Exit code of the job's process.
EXIT_STATUS 
[PBSDone] Exit status
FROM 
[Accepted] The software component the job was received from.
[Refused] The software component that tried to send the job.
FROM_HOST 
[Accepted] Hostname of the component the job was received from.
[Refused] Hostname of the component that tried to send the job.
FROM_INSTANCE 
[Accepted] Instance of the component the job was received from.
[Refused] Instance of the component that tried to send the job.
HELPER_NAME 
[HelperCall] Name of the called helper component.
[HelperReturn] Name of the called helper component.
HELPER_PARAMS 
[HelperCall] Parameters of the call to the helper component.
HISTOGRAM 
[CollectionState] User readable histogram; useful for debugging.
HOST 
[common] Hostname of the machine where the event was generated.
INFO 
[CondorChkpt] Some useful info
[CondorGlobusResource] Some useful info
[CondorGlobusSubmit] Some useful info
[CondorNodeExecute] Some useful info
[CondorNodeTerminate] Some useful info
[CondorPostSctiptTerminate] Some useful info
JDL 
[RegJob] Job description of the job being registered.
JOB 
[EnQueued] Job description in the receiver's language.
[Transfer] Job description in receiver's language.
JOBID 
[common] Grid job id of the job the event belongs to.
JOBSTAT 
[Notification] Status of the job (the notification content).
JOBTYPE 
[RegJob] Type of the job being registered (SIMPLE, DAG, PARTITIONABLE or PARTITIONED).
LEVEL 
[common] Logging level (in the range from DEBUG to EMERGENCY).
LOCAL_JOBID 
[Accepted] New job id as assigned by the receiving component.
[DeQueued] New job id as assigned by the retreiving component.
MATCHED_HOST 
[CondorMatch] Matched host
NAME 
[PBSQueued] Job name
[PBSResourceUsage] Name of resource
[UserTag] Arbitrary user tag name.
NODE 
[Running] Worker node on which the job executable is being run.
NOTIFID 
[Notification] Notification id.
NS 
[RegJob] NetworkServer handling the newly registered job.
NSUBJOBS 
[RegJob] Number of subjobs this job plans to spawn.
OPERATION 
[ChangeACL] Operation requested to perform with ACL (add, remove).
OWNER 
[CondorMatch] Owner
[CondorReject] Owner
[Notification] Identification of the job owner (certificate subject).
[PBSQueued] Job owner
PARENT 
[RegJob] Grid job id of the parent job registering this new one.
PERMISSION 
[ChangeACL] ACL permission to change (currently only READ).
PERMISSION_TYPE 
[ChangeACL] Type of permission requested ('allow', 'deny').
PID 
[CondorRun] Actual process ID
[PBSRun] Actual process ID
PREEMPTING 
[CondorMatch] Preempting
PRIORITY 
[common] Message priority (yet 0 for asynchronous and 1 for synchronous transfers).
QUANTITY 
[PBSResourceUsage] The quantity
[ResourceUsage] Resources's quantity (how much).
QUEUE 
[DeQueued] Name of the queue the job was obtained from.
[EnQueued] Queue into which the job has been stored for retrieval by another component.
[PBSQueued] Queue name
REASON 
[Abort] Reason why the job was aborted by the system.
[Cancel] Detailed description of the attempt to cancel the job, especially the reason of failure.
[Clear] Description of the reason why the job was cleared and the output sandbox removed (USER, TIMEOUT or NOOUTPUT).
[CondorAbort] reason
[CondorEvict] reason
[CondorHold] reason
[CondorRelease] reason
[CondorSuspend] reason
[CondorTerminate] reason
[CondorUnsuspend] reason
[Done] Detailed description why the job was terminated.
[EnQueued] Detailed description of the attempt to enqueue the job, especially the reason of failure.
[PBSPending] Reasons of job pendation or errors
[Pending] Description why the matching CE for the job was not found (yet).
[Refused] Description of the reason why the job was refused.
[Resubmission] Reason why the job will or will not be resubmitted.
[Resume] Reason for the resume.
[Suspend] Reason for the suspend.
[Transfer] Detailed description of the transfer, especially reason of failure.
RESOURCE 
[ResourceUsage] Resource's name.
RESULT 
[EnQueued] Result code of the attempt to put job into the queue (START, OK, REFUSED or FAIL).
[Resubmission] Result code of the resubmission decision (WILLRESUB or WONTRESUB or SHALLOW).
[Transfer] Result code of the transfer attempt (START, OK, REFUSED or FAIL).
RETVAL 
[HelperReturn] Data returned by the call to the helper component.
SCHEDULER 
[CondorRun] Scheduler ID
[PBSRun] Scheduler ID
SEED 
[RegJob] Seed for subjob id generation.
SEQCODE 
[common] Sequence code assigned to the event.
SHADOW_EXIT_STATUS 
[CondorAbort] Condor shadow exit status
[CondorEvict] Condor shadow exit status
[CondorHold] Condor shadow exit status
[CondorRelease] Condor shadow exit status
[CondorSuspend] Condor shadow exit status
[CondorTerminate] Condor shadow exit status
[CondorUnsuspend] Condor shadow exit status
SOURCE 
[common] Source (software component) which generated this event.
SRC_INSTANCE 
[common] Instance of source component (e.g. service communication endpoint).
SRC_ROLE 
[HelperCall] The role the event sender is playing in the helper call (CALLING or CALLEE).
[HelperReturn] The role the event sender is playing in the helper call (CALLING or CALLEE).
STATE 
[CollectionState] New collection state.
STATUS_CODE 
[Cancel] Classification of the attempt to cancel the job (REQ, REFUSE, DONE or ABORT).
[CondorGlobusResource] Status code
[CondorGlobusSubmit]
[CondorReject] Reason code for the rejection of the job
[Done] Reason code for the termination of the job (OK, FAILED or CANCELLED).
SVC_HOST 
[Listener] Hostname of the interactive job controller.
SVC_NAME 
[Listener] Name of the port instance for interactive job control.
SVC_PORT 
[Listener] Port number of the interactive job controller.
TAG 
[Chkpt] Application specific checkpoint tag.
[Resubmission] Value of the attribute on which the decision to resubmit the job was based.
TIMESTAMP 
[common] Time the event was generated.
UNIT 
[PBSResourceUsage] Units (sec, kB, etc.)
[ResourceUsage] Units (sec, kB, etc.).
UNIVERSE 
[CondorRun] Condor Universe
USAGE 
[PBSResourceUsage] Type of record
USER 
[common] Identity (certificate subject) of the event sender.
USER_ID 
[ChangeACL] DN or VOMS parameter (in format VO:group).
USER_ID_TYPE 
[ChangeACL] Type of information given in user_id (DN or VOMS).
VALUE 
[UserTag] Arbitrary user tag value.
WN_SEQ 
[ReallyRunning] Sequence code on the worker node.
ATTR_MAX  Limit for checking attribute code validity.

enum Event::AttrType
 

Symbolic names for types of attribute values.

Enumeration values:
INT_T  Integer value.
STRING_T  String value.
TIMEVAL_T  Time value (ie. struct timeval).
PORT_T  Service port (integer).
LOGSRC_T  Source of the event (integer).
JOBID_T  JobId value.
NOTIFID_T  NotifId value.
FLOAT_T  Float value.
DOUBLE_T  Double value.

enum Event::CancelCode
 

Classification of the attempt to cancel the job (REQ, REFUSE, DONE or ABORT).

Enumeration values:
CANCEL_REQ  The request was acknowledged.
CANCEL_REFUSE  The request was declined by this component.
CANCEL_DONE  The request was completed by whole WMS.
CANCEL_ABORT  The request was refused by whole WMS.

enum Event::ClearCode
 

Description of the reason why the job was cleared and the output sandbox removed (USER, TIMEOUT or NOOUTPUT).

Enumeration values:
CLEAR_USER  User retrieved output sandbox.
CLEAR_TIMEOUT  Timed out, resource forced purge of the sandbox.
CLEAR_NOOUTPUT  No output was generated.

enum Event::CondorGlobusResourceCode
 

Status code

Enumeration values:
CONDORGLOBUSRESOURCE_UP  Resource UP
CONDORGLOBUSRESOURCE_DOWN  Resource DOWM

enum Event::CondorGlobusSubmitCode
 

Enumeration values:
CONDORGLOBUSSUBMIT_OK  The job was submitted successfully
CONDORGLOBUSSUBMIT_FAIL  Job submission failed

enum Event::CondorRejectCode
 

Reason code for the rejection of the job

Enumeration values:
CONDORREJECT_NOMATCH  No match found
CONDORREJECT_OTHER  Other reason

enum Event::DoneCode
 

Reason code for the termination of the job (OK, FAILED or CANCELLED).

Enumeration values:
DONE_OK  The job terminated by itself.
DONE_FAILED  The job disappeared from LRMS.
DONE_CANCELLED  The job was cancelled by user request.

enum Event::EnQueuedCode
 

Result code of the attempt to put job into the queue (START, OK, REFUSED or FAIL).

Enumeration values:
ENQUEUED_START  The sending component has started or is about to start enqueuing the job.
ENQUEUED_OK  The job was enqueued successfully.
ENQUEUED_REFUSED  The job was refused by the other component.
ENQUEUED_FAIL  The transfer failed for other reason than explicit refusal.

enum Event::HelperCallCode
 

The role the event sender is playing in the helper call (CALLING or CALLEE).

Enumeration values:
HELPERCALL_CALLING  The logging component is caller.
HELPERCALL_CALLED  The logging component is callee.

enum Event::HelperReturnCode
 

The role the event sender is playing in the helper call (CALLING or CALLEE).

Enumeration values:
HELPERRETURN_CALLING  The logging component is caller.
HELPERRETURN_CALLED  The logging component is callee.

enum Event::PBSResourceUsageCode
 

Type of record

Enumeration values:
PBSRESOURCEUSAGE_REQUESTED  Requested value
PBSRESOURCEUSAGE_USED  Consumed quantity

enum Event::RegJobCode
 

Type of the job being registered (SIMPLE, DAG, PARTITIONABLE or PARTITIONED).

Enumeration values:
REGJOB_SIMPLE  The job is simple job.
REGJOB_DAG  The job is dag (containing static set of subjobs).
REGJOB_PARTITIONABLE  The job is partitionable (may become partitioned).
REGJOB_PARTITIONED  The job is partitioned (dynamically created dag).
REGJOB_COLLECTION  The job is collection (containing static set of subjobs).
REGJOB_PBS  PBS job
REGJOB_CONDOR  Condor job

enum Event::ResubmissionCode
 

Result code of the resubmission decision (WILLRESUB or WONTRESUB or SHALLOW).

Enumeration values:
RESUBMISSION_WILLRESUB  The job will be resubmitted (deep resubmission).
RESUBMISSION_WONTRESUB  The job will not be resubmitted.
RESUBMISSION_SHALLOW  Shallow resubmission (user payload has not started yet)

enum Event::TransferCode
 

Result code of the transfer attempt (START, OK, REFUSED or FAIL).

Enumeration values:
TRANSFER_START  The sending component has started or is about to start the transfer.
TRANSFER_OK  The job was sent successfully.
TRANSFER_REFUSED  The job was refused by the other component.
TRANSFER_FAIL  The transfer failed for other reason than explicit refusal (eg. network timeout).

enum Event::Type
 

Event type codes identify which of the event fields are valid.

Enumeration values:
UNDEF  Undefined event type.
TRANSFER  Start, success, or failure of job transfer to another component.
ACCEPTED  Accepting job (successful counterpart to Transfer).
REFUSED  Refusing job (unsuccessful counterpart to Transfer).
ENQUEUED  The job has been enqueued in an inter-component queue.
DEQUEUED  The job has been dequeued from an inter-component queue.
HELPERCALL  Helper component is called.
HELPERRETURN  Helper component is returning the control.
RUNNING  Job wrapper started.
RESUBMISSION  Result of resubmission decision.
DONE  Execution terminated (normally or abnormally).
CANCEL  Cancel operation has been attempted on the job.
ABORT  Job aborted by system.
CLEAR  Job cleared, output sandbox removed
PURGE  Job is purged from bookkepping server.
MATCH  Matching CE found.
PENDING  No matching CE found yet.
REGJOB  New job registration.
CHKPT  Application-specific checkpoint record.
LISTENER  Listening network port for interactive control.
CURDESCR  Current state of job processing (optional event).
USERTAG  User tag -- arbitrary name=value pair.
CHANGEACL  Management of ACL stored on bookkepping server.
NOTIFICATION  Management of notification service.
RESOURCEUSAGE  Resource (CPU, memory etc.) consumption.
REALLYRUNNING  User payload started.
SUSPEND  Job execution (queuing) was suspended.
RESUME  Job execution (queuing) was resumed.
COLLECTIONSTATE  State of the collection.
PBSQUEUED  Job enqued
PBSMATCH  Scheduler created exec_host
PBSPENDING  Scheduler is not able to find exec_host, or some error occured
PBSRUN  Job attempted to be run by the logging component
PBSRERUN  Job rerun requested
PBSDONE  Job terminated
PBSDEQUEUED  Job dequeued
PBSRESOURCEUSAGE  Resources requested/consumed
PBSERROR  Any error occured
CONDORMATCH  Job MATCHed
CONDORREJECT  Job REJECTed
CONDORRUN  Condor EXECUTEed
CONDORCHKPT 
CONDOREVICT 
CONDORTERMINATE 
CONDORABORT 
CONDORSUSPEND 
CONDORUNSUSPEND 
CONDORHOLD 
CONDORRELEASE 
CONDORNODEEXECUTE 
CONDORNODETERMINATE 
CONDORPOSTSCTIPTTERMINATE 
CONDORGLOBUSSUBMIT 
CONDORGLOBUSRESOURCE 
TYPE_MAX  Limit for checking type validity.


Constructor & Destructor Documentation

Event::Event void   ) 
 

Default constructor.

Initializes an empty event.

Event::Event edg_wll_Event *   ) 
 

Constructor from corresponding C type.

Initializes the object from the corresponding C struct, in fact holding the pointer to it.

Event::Event const Event  ) 
 

Copy constructor.

Creates a copy of the object by sharing the C struct with the original.

Event::~Event void   ) 
 

Destructor.

Releases the C struct (possibly deallocating it).


Member Function Documentation

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

Attribute name.

Retrieves string representation of the attribute name.

Parameters:
[in] name Symbolic name of the attribute.
Returns:
String name of the attribute.
Exceptions:
Exception Invalid attribute name.

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

List of attributes and types valid for this instance.

Retrieves description of all attributes defined for this event.

Returns:
Vector of Attr -- AttrType pairs.
Exceptions:
Exception Invalid event type.

const std::string Event::getEventName Type  type  )  [static]
 

Event name.

Retrieves string representation of the event type.

Parameters:
[in] type Symbolic name of the event type.
Returns:
String name of the event.
Exceptions:
Exception Invalid event type.

double Event::getValDouble Attr  name  )  const
 

Retrieve double attribute.

Retrieves value for attributes of double type.

Parameters:
[in] name Name of the attribute to retrieve.
Returns:
Integer value of the attribute.
Exceptions:
Exception Invalid event type or attribute not defined for this event.

float Event::getValFloat Attr  name  )  const
 

Retrieve float attribute.

Retrieves value for attributes of float type.

Parameters:
[in] name Name of the attribute to retrieve.
Returns:
Integer value of the attribute.
Exceptions:
Exception Invalid event type or attribute not defined for this event.

int Event::getValInt Attr  name  )  const
 

Retrieve integer attribute.

Retrieves value for attributes of integer type.

Parameters:
[in] name Name of the attribute to retrieve.
Returns:
Integer value of the attribute.
Exceptions:
Exception Invalid event type or attribute not defined for this event.

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

Retrieve jobid attribute

Retrieves value for attributes of JobId type.

Parameters:
[in] name Name of the attribute to retrieve.
Returns:
JobId value of the attribute.
Exceptions:
Exception Invalid event type or attribute not defined for this event.

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

Retrieve string attribute.

Retrieves value for attributes of string type.

Parameters:
[in] name Name of the attribute to retrieve.
Returns:
String value of the attribute.
Exceptions:
Exception Invalid event type or attribute not defined for this event.

struct timeval Event::getValTime Attr  name  )  const
 

Retrieve time attribute.

Retrieves value for attributes of timeval type.

Parameters:
[in] name Name of the attribute to retrieve.
Returns:
struct timeval value of the attribute.

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

String representation of the event type.

Returns string representing the event type.

Returns:
Name of the event.
Exceptions:
Exception Invalid event type.

Event& Event::operator= const Event  ) 
 

Assign new Event to an existing instance.

The original data are released and new ones are made accessible.

Returns:
Reference to this object.


Friends And Related Function Documentation

friend class CountRef<Event> [friend]
 

friend class Job [friend]
 

friend class ServerConnection [friend]
 


Member Data Documentation

Type Event::type
 

Type of the event as defined by Type.


The documentation for this class was generated from the following file:
Generated on Tue May 8 00:32:31 2007 for Glite LB Client: CPP - Interface by  doxygen 1.3.9.1