Main Page | Modules | Data Structures | File List | Data Fields | Globals

Server querying

The core part of the LB querying API. More...

Data Structures

struct  _edg_wll_QueryRec

Defines

#define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
#define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
#define EDG_WLL_QUERY_TIMEOUT_MAX   1800
#define EDG_WLL_QUERY_TIMEOUT_MAX   1800
#define EDG_WLL_STAT_CLASSADS   1
#define EDG_WLL_STAT_CHILDREN   2
#define EDG_WLL_STAT_CHILDSTAT   4
#define EDG_WLL_STAT_CHILDHIST_FAST   8
#define EDG_WLL_STAT_CHILDHIST_THOROUGH   16

Typedefs

typedef enum _edg_wll_QueryAttr edg_wll_QueryAttr
typedef enum _edg_wll_QueryOp edg_wll_QueryOp
typedef _edg_wll_QueryRec edg_wll_QueryRec

Enumerations

enum  _edg_wll_QueryAttr {
  EDG_WLL_QUERY_ATTR_UNDEF = 0, EDG_WLL_QUERY_ATTR_JOBID, EDG_WLL_QUERY_ATTR_OWNER, EDG_WLL_QUERY_ATTR_STATUS,
  EDG_WLL_QUERY_ATTR_LOCATION, EDG_WLL_QUERY_ATTR_DESTINATION, EDG_WLL_QUERY_ATTR_DONECODE, EDG_WLL_QUERY_ATTR_USERTAG,
  EDG_WLL_QUERY_ATTR_TIME, EDG_WLL_QUERY_ATTR_LEVEL, EDG_WLL_QUERY_ATTR_HOST, EDG_WLL_QUERY_ATTR_SOURCE,
  EDG_WLL_QUERY_ATTR_INSTANCE, EDG_WLL_QUERY_ATTR_EVENT_TYPE, EDG_WLL_QUERY_ATTR_CHKPT_TAG, EDG_WLL_QUERY_ATTR_RESUBMITTED,
  EDG_WLL_QUERY_ATTR_PARENT, EDG_WLL_QUERY_ATTR_EXITCODE, EDG_WLL_QUERY_ATTR_JDL_ATTR, EDG_WLL_QUERY_ATTR_STATEENTERTIME,
  EDG_WLL_QUERY_ATTR_LASTUPDATETIME, EDG_WLL_QUERY_ATTR__LAST
}
enum  _edg_wll_QueryOp {
  EDG_WLL_QUERY_OP_EQUAL, EDG_WLL_QUERY_OP_LESS, EDG_WLL_QUERY_OP_GREATER, EDG_WLL_QUERY_OP_WITHIN,
  EDG_WLL_QUERY_OP_UNEQUAL
}

Functions

int edg_wll_QueryEvents (edg_wll_Context context, const edg_wll_QueryRec *job_conditions, const edg_wll_QueryRec *event_conditions, edg_wll_Event **events)
int edg_wll_QueryEventsExt (edg_wll_Context context, const edg_wll_QueryRec **job_conditions, const edg_wll_QueryRec **event_conditions, edg_wll_Event **events)
int edg_wll_QueryEventsProxy (edg_wll_Context context, const edg_wll_QueryRec *job_conditions, const edg_wll_QueryRec *event_conditions, edg_wll_Event **events)
int edg_wll_QueryEventsExtProxy (edg_wll_Context context, const edg_wll_QueryRec **job_conditions, const edg_wll_QueryRec **event_conditions, edg_wll_Event **events)
int edg_wll_QueryJobs (edg_wll_Context context, const edg_wll_QueryRec *conditions, int flags, edg_wlc_JobId **jobs, edg_wll_JobStat **states)
int edg_wll_QueryJobsExt (edg_wll_Context context, const edg_wll_QueryRec **conditions, int flags, edg_wlc_JobId **jobs, edg_wll_JobStat **states)
int edg_wll_QueryJobsProxy (edg_wll_Context context, const edg_wll_QueryRec *conditions, int flags, edg_wlc_JobId **jobs, edg_wll_JobStat **states)
int edg_wll_QueryJobsExtProxy (edg_wll_Context context, const edg_wll_QueryRec **conditions, int flags, edg_wlc_JobId **jobs, edg_wll_JobStat **states)
int edg_wll_JobStatus (edg_wll_Context context, const edg_wlc_JobId jobid, int flags, edg_wll_JobStat *status)
int edg_wll_JobStatusProxy (edg_wll_Context context, const edg_wlc_JobId jobid, int flags, edg_wll_JobStat *status)
int edg_wll_JobLog (edg_wll_Context context, const edg_wlc_JobId jobId, edg_wll_Event **events)
int edg_wll_JobLogProxy (edg_wll_Context context, const edg_wlc_JobId jobId, edg_wll_Event **events)
int edg_wll_UserJobs (edg_wll_Context context, edg_wlc_JobId **jobs, edg_wll_JobStat **states)
int edg_wll_UserJobsProxy (edg_wll_Context context, edg_wlc_JobId **jobs, edg_wll_JobStat **states)
int edg_wll_GetIndexedAttrs (edg_wll_Context context, edg_wll_QueryRec ***attrs)
int edg_wll_GetServerLimit (edg_wll_Context context, int *limit)
int edg_wll_QueryListener (edg_wll_Context context, edg_wlc_JobId jobId, const char *name, char **host, uint16_t *port)
int edg_wll_QueryListenerProxy (edg_wll_Context context, edg_wlc_JobId jobId, const char *name, char **host, uint16_t *port)
int edg_wll_QuerySequenceCodeProxy (edg_wll_Context context, edg_wlc_JobId jobId, char **code)
void edg_wll_QueryRecFree (edg_wll_QueryRec *)

Detailed Description

The core part of the LB querying API.

The functions in this part of the API are responsible for transforming the user query to the LB protocol, contacting the server, receiving back the response and transforming back the results to the API data structures.

General rules:


Define Documentation

#define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
 

default query timeout (in seconds)

#define EDG_WLL_QUERY_TIMEOUT_DEFAULT   120
 

default query timeout (in seconds)

#define EDG_WLL_QUERY_TIMEOUT_MAX   1800
 

maximal query timeout (in seconds)

#define EDG_WLL_QUERY_TIMEOUT_MAX   1800
 

maximal query timeout (in seconds)

#define EDG_WLL_STAT_CHILDHIST_FAST   8
 

partially complete histogram of child job states

#define EDG_WLL_STAT_CHILDHIST_THOROUGH   16
 

full and up-to date histogram of child job states

#define EDG_WLL_STAT_CHILDREN   2
 

list of subjob JobId's

#define EDG_WLL_STAT_CHILDSTAT   4
 

apply the flags recursively to subjobs

#define EDG_WLL_STAT_CLASSADS   1
 

various job description fields


Typedef Documentation

typedef enum _edg_wll_QueryAttr edg_wll_QueryAttr
 

Predefined types for query attributes

typedef enum _edg_wll_QueryOp edg_wll_QueryOp
 

Predefined types for query operands

typedef struct _edg_wll_QueryRec edg_wll_QueryRec
 

Single query condition for edg_wll_Query(). Those records are composed to form an SQL where clause when processed at the L&B server


Enumeration Type Documentation

enum _edg_wll_QueryAttr
 

Predefined types for query attributes

Enumeration values:
EDG_WLL_QUERY_ATTR_UNDEF  Not-defined value, used to terminate lists etc.
EDG_WLL_QUERY_ATTR_JOBID  Job Id
See also:
_edg_wll_QueryRec
EDG_WLL_QUERY_ATTR_OWNER  Job owner
See also:
_edg_wll_QueryRec
EDG_WLL_QUERY_ATTR_STATUS  Current job status
EDG_WLL_QUERY_ATTR_LOCATION  Where is the job processed
EDG_WLL_QUERY_ATTR_DESTINATION  Destination CE
EDG_WLL_QUERY_ATTR_DONECODE  Minor done status (OK,fail,cancel)
EDG_WLL_QUERY_ATTR_USERTAG  User tag
EDG_WLL_QUERY_ATTR_TIME  Timestamp
See also:
_edg_wll_QueryRec
EDG_WLL_QUERY_ATTR_LEVEL  Logging level (see "dglog.h") *
See also:
_edg_wll_QueryRec
EDG_WLL_QUERY_ATTR_HOST  Where the event was generated
EDG_WLL_QUERY_ATTR_SOURCE  Source component
EDG_WLL_QUERY_ATTR_INSTANCE  Instance of the source component
EDG_WLL_QUERY_ATTR_EVENT_TYPE  Event type
See also:
_edg_wll_QueryRec
EDG_WLL_QUERY_ATTR_CHKPT_TAG  Checkpoint tag
EDG_WLL_QUERY_ATTR_RESUBMITTED  Job was resubmitted
EDG_WLL_QUERY_ATTR_PARENT  Job was resubmitted
EDG_WLL_QUERY_ATTR_EXITCODE  Unix exit code
EDG_WLL_QUERY_ATTR_JDL_ATTR  Arbitrary JDL attribute
EDG_WLL_QUERY_ATTR_STATEENTERTIME  When entered current status
EDG_WLL_QUERY_ATTR_LASTUPDATETIME  Time of the last known event of the job
EDG_WLL_QUERY_ATTR__LAST 

enum _edg_wll_QueryOp
 

Predefined types for query operands

Enumeration values:
EDG_WLL_QUERY_OP_EQUAL  attribute is equal to the operand value
See also:
_edg_wll_QueryRec
EDG_WLL_QUERY_OP_LESS  attribute is grater than the operand value
See also:
_edg_wll_QueryRec
EDG_WLL_QUERY_OP_GREATER  attribute is less than the operand value
See also:
_edg_wll_QueryRec
EDG_WLL_QUERY_OP_WITHIN  attribute is in given interval
See also:
_edg_wll_QueryRec
EDG_WLL_QUERY_OP_UNEQUAL  attribute is not equal to the operand value
See also:
_edg_wll_QueryRec


Function Documentation

int edg_wll_GetIndexedAttrs edg_wll_Context  context,
edg_wll_QueryRec ***  attrs
 

Server supported indexed attributes

See also:
DataGrid-01-TEN-0125
Parameters:
[in] context context to work with
[out] attrs configured indices (each index is an UNDEF-terminated array of QueryRec's from which only attr (and attr_id eventually) are meaningful

int edg_wll_GetServerLimit edg_wll_Context  context,
int *  limit
 

Retrieve limit on query result size (no. of events or jobs).

Warning:
not implemented.
See also:
DataGrid-01-TEN-0125
Parameters:
[in] context context to work with
[out] limit server imposed limit

int edg_wll_JobLog edg_wll_Context  context,
const edg_wlc_JobId  jobId,
edg_wll_Event **  events
 

Return all events related to a single job. Convenience wrapper around edg_wll_Query()

Parameters:
[in] context context to work with
[in] jobId job to query
[out] events list of events

int edg_wll_JobLogProxy edg_wll_Context  context,
const edg_wlc_JobId  jobId,
edg_wll_Event **  events
 

Query LBProxy and use plain communication

Warning:
edg_wll_*Proxy() functions are not implemented in release 1.

int edg_wll_JobStatus edg_wll_Context  context,
const edg_wlc_JobId  jobid,
int  flags,
edg_wll_JobStat status
 

Return status of a single job.

Parameters:
[in] context context to operate on
[in] jobid query this job
[in] flags specifies optional status fields to retrieve,
See also:
EDG_WLL_STAT_CLASSADS, EDG_WLL_STAT_CHILDREN, EDG_WLL_STAT_CHILDSTAT
Parameters:
[out] status status

int edg_wll_JobStatusProxy edg_wll_Context  context,
const edg_wlc_JobId  jobid,
int  flags,
edg_wll_JobStat status
 

Query LBProxy and use plain communication

Parameters:
[in] context context to operate on
[in] jobid query this job
[in] flags specifies optional status fields to retrieve,
See also:
EDG_WLL_STAT_CLASSADS, EDG_WLL_STAT_CHILDREN, EDG_WLL_STAT_CHILDSTAT
Parameters:
[out] status the status of the job
Warning:
edg_wll_*Proxy() functions are not implemented in release 1.

int edg_wll_QueryEvents edg_wll_Context  context,
const edg_wll_QueryRec job_conditions,
const edg_wll_QueryRec event_conditions,
edg_wll_Event **  events
 

General query on events. Return events satisfying all conditions query records represent conditions in the form attr op value eg. time > 87654321.

See also:
edg_wll_QueryRec
Parameters:
[in] context context to work with
[in] job_conditions query conditions (ANDed) on current job status, null (i.e. ATTR_UNDEF) terminated list. NULL means empty list, i.e. always TRUE
[in] event_conditions conditions on events, null terminated list, NULL means empty list, i.e. always TRUE
[out] events list of matching events

int edg_wll_QueryEventsExt edg_wll_Context  context,
const edg_wll_QueryRec **  job_conditions,
const edg_wll_QueryRec **  event_conditions,
edg_wll_Event **  events
 

Extended event query interface. Similar to edg_wll_QueryEvents but the conditions are nested lists. Elements of the inner lists have to refer to the same attribute and they are logically ORed. The inner lists themselves are logically ANDed then.

int edg_wll_QueryEventsExtProxy edg_wll_Context  context,
const edg_wll_QueryRec **  job_conditions,
const edg_wll_QueryRec **  event_conditions,
edg_wll_Event **  events
 

Warning:
edg_wll_*Proxy() functions are not implemented in release 1.

int edg_wll_QueryEventsProxy edg_wll_Context  context,
const edg_wll_QueryRec job_conditions,
const edg_wll_QueryRec event_conditions,
edg_wll_Event **  events
 

Query LBProxy and use plain communication

Warning:
edg_wll_*Proxy() functions are not implemented in release 1.

int edg_wll_QueryJobs edg_wll_Context  context,
const edg_wll_QueryRec conditions,
int  flags,
edg_wlc_JobId **  jobs,
edg_wll_JobStat **  states
 

General query on jobs. Return jobs (and possibly their states) for which an event satisfying the conditions exists.

See also:
edg_wll_QueryEvents
Parameters:
[in] context context to work with
[in] conditions query records (ANDed), null (i.e. EDG_WLL_ATTR_UNDEF) terminated list
[in] flags additional status fields to retrieve (
See also:
edg_wll_JobStatus)
Parameters:
[out] jobs list of job ids. May be NULL.
[out] states list of corresponding states (returned only if not NULL)

int edg_wll_QueryJobsExt edg_wll_Context  context,
const edg_wll_QueryRec **  conditions,
int  flags,
edg_wlc_JobId **  jobs,
edg_wll_JobStat **  states
 

Extended job query interface. Similar to edg_wll_QueryJobs but the conditions are nested lists. Elements of the inner lists have to refer to the same attribute and they are logically ORed. The inner lists themselves are logically ANDed then.

int edg_wll_QueryJobsExtProxy edg_wll_Context  context,
const edg_wll_QueryRec **  conditions,
int  flags,
edg_wlc_JobId **  jobs,
edg_wll_JobStat **  states
 

Warning:
edg_wll_*Proxy() functions are not implemented in release 1.

int edg_wll_QueryJobsProxy edg_wll_Context  context,
const edg_wll_QueryRec conditions,
int  flags,
edg_wlc_JobId **  jobs,
edg_wll_JobStat **  states
 

Query LBProxy and use plain communication

Warning:
edg_wll_*Proxy() functions are not implemented in release 1.

int edg_wll_QueryListener edg_wll_Context  context,
edg_wlc_JobId  jobId,
const char *  name,
char **  host,
uint16_t *  port
 

UI port for intactive jobs. Used internally by WMS.

Parameters:
[in] context context to work with
[in] jobId job to query
[in] name name of the UI-port
[out] host hostname of port
[out] port port number

int edg_wll_QueryListenerProxy edg_wll_Context  context,
edg_wlc_JobId  jobId,
const char *  name,
char **  host,
uint16_t *  port
 

Query LBProxy and use plain communication

void edg_wll_QueryRecFree edg_wll_QueryRec  ) 
 

Free edg_wll_QueryRec internals, not the structure itself

int edg_wll_QuerySequenceCodeProxy edg_wll_Context  context,
edg_wlc_JobId  jobId,
char **  code
 

Ask LB Proxy server for sequence number

Parameters:
[in] context context to work with
[in] jobId job to query
[out] code sequence code

int edg_wll_UserJobs edg_wll_Context  context,
edg_wlc_JobId **  jobs,
edg_wll_JobStat **  states
 

All current user's jobs.

Parameters:
[in] context context to work with
[out] jobs list of the user's jobs
[out] states list of the jobs' states

int edg_wll_UserJobsProxy edg_wll_Context  context,
edg_wlc_JobId **  jobs,
edg_wll_JobStat **  states
 

Query LBProxy and use plain communication

Warning:
edg_wll_*Proxy() functions are not implemented in release 1.


Generated on Fri Aug 20 13:06:40 2010 for Glite LB Client: C - Interface by  doxygen 1.3.9.1