Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
struct pbs_db_obj_info {
  int 	pbs_db_obj_type; /* identifies the contained object type */
  union {
	pbs_db_job_info_t	*pbs_db_job; 	/* map database job structure to C */
	pbs_db_jobscr_info_t	*pbs_db_jobscr;	/* map database job script to C */
	pbs_db_resv_info_t	*pbs_db_resv;	/* map database resv structure to C */
	pbs_db_svr_info_t	*pbs_db_svr;	/* map database server structure to C */
	pbs_db_que_info_t	*pbs_db_que;	/* map database queue structure to C */
	pbs_db_node_info_t	*pbs_db_node;	/* map database node structure to C */
	pbs_db_sched_info_t	*pbs_db_sched;	/* map database scheduler structure to C */	
	pbs_db_mominfo_time_t	*pbs_db_mominfo_tm; /* map database mominfo_time structure to C */
  } pbs_db_un;
};
typedef struct pbs_db_obj_info pbs_db_obj_info_t;

/* Structure used to map database job structure to C */
struct pbs_db_job_info {
	char     ji_jobid[PBS_MAXSVRJOBID + 1]; /* job identifier */
	INTEGER  ji_state;    	/* INTEGERernal copy of state */
	INTEGER  ji_substate; 	/* job sub-state */
	INTEGER  ji_svrflags; 	/* server flags */
	INTEGER  ji_numattr;	/* not used */
	INTEGER  ji_ordering; 	/* special scheduling ordering */
	INTEGER  ji_priority; 	/* INTEGERernal priority */
	BIGINT   ji_stime;    	/* time job started execution */
	BIGINT   ji_endtBdry; 	/* estimate upper bound on end time */
	char     ji_queue[PBS_MAXQUEUENAME + 1]; /* name of current queue */
	char     ji_destin[PBS_MAXROUTEDEST + 1]; /* dest from qmove/route */
	INTEGER  ji_un_type;  	/* job's queue type */
	INTEGER  ji_exitstatmomaddr; 	/* jobhost exitaddr statusof from MOMServer */
	BIGINTINTEGER   ji_quetimemomport;  	/* timeport entered# queue */
	BIGINT INTEGER  ji_rteretry; /* exitstat;	/* job exit status from MOM */
	BIGINT   ji_quetime;	/* time entered queue */
	BIGINT   ji_rteretry;	/* route retry time */
	INTEGER  ji_fromsock; 	/* socket job coming over */
	BIGINT   ji_fromaddr; 	/* host job coming from   */
	char     ji_4jid[8];  	/* extended job save data */
	char     ji_4ash[8];  	/* extended job save data */
	INTEGER  ji_credtype; 	/* credential type */
	INTEGER  ji_qrank;    	/* sort key for db query */
	BIGINTchar     ji_savetm;   [DB_TIMESTAMP_LEN + 1];	/* job save time */
	BIGINTchar     ji_creattm;  [DB_TIMESTAMP_LEN + 1];	/* job create time */
	pbs_db_attr_list_t db_attr_list;	/* list of attributes for database */
	pbs_db_attr_list_t cache_attr_list;	/* list of attributes to save in cache */
};
typedef struct pbs_db_job_info pbs_db_job_info_t;

/* Structure used to map database resv structure to C */
struct pbs_db_resv_info {
	char    ri_resvid[PBS_MAXSVRJOBID + 1]; 	/* reservation identifier */
	char    ri_queue[PBS_MAXQUEUENAME + 1]; 	/* queue used by reservation */
	INTEGER ri_state;	/* internal copy of state */
	INTEGER ri_substate;	/* substate of resv state */
	INTEGER ri_type;	/* "reservation" or "reservation job"*/
	BIGINT  ri_stime;	/* left window boundry  */
	BIGINT  ri_etime;	/* right window boundry */
	BIGINT  ri_duration;	/* reservation duration */
	INTEGER ri_tactive;	/* time reservation became active */
	INTEGER ri_svrflags;	/* server flags */
	INTEGER ri_fromsocknumattr;	/* resvnot from sockused */
	BIGINTINTEGER  ri_fromaddrresvTag;	/* resv from sock addrnot used */
	BIGINTINTEGER  ri_un_creattmtype;	/* resvnot create time on db used */
	BIGINTINTEGER  ri_savetmfromsock;	/* resv savefrom timesock on db */
	pbs_db_attr_list_t attr_list; /* list of attributesBIGINT  ri_fromaddr;	/* resv from sock addr */
};	char typedef struct pbs_db_resv_info pbs_db_resv_info_t;

/* Structure used to map database server structure to C */
struct pbs_db_svr_info {
	INTEGER sv_numjobs; 	/* number of job owned by server */
	INTEGER sv_numque;	/* nuber of queues managed */
	BIGINT  sv_jobidnumber; /* next number to use in new jobid  */
	BIGINT  sv_creattm; 	/* time of server db create */ 
	BIGINT  sv_savetm ri_creattm[DB_TIMESTAMP_LEN + 1];	/* resv create time on db */
	char    ri_savetm[DB_TIMESTAMP_LEN + 1];	/* resv save time on db */ 
	pbs_db_attr_list_t cache_attr_list;	/* list of attributes */
	pbs_db_attr_list_t db_attr_list;	/* list of attributes */
};
typedef struct pbs_db_resv_info pbs_db_resv_info_t;

/* Structure used to map database server structure to C */
struct pbs_db_svr_info {
	char sv_creattm[DB_TIMESTAMP_LEN + 1];	/* time of server db updatecreate */
	pbs_db_attr_char sv_savetm[DB_TIMESTAMP_LEN + 1];	/* time of server db update */
	pbs_db_attr_list_t cache_attr_list;	/* list of attributes */
	pbs_db_attr_list_t db_attr_list;	/* list of attributes */
};
typedef struct pbs_db_svr_info pbs_db_svr_info_t;

/* Structure used to map database scheduler structure to C */
struct pbs_db_sched_info {
	char    sched_name[PBS_MAXSCHEDNAME+1]; 		/* sched name */
	BIGINTchar  sched_creattm;	[DB_TIMESTAMP_LEN + 1];	/* sched create time on db */
	BIGINTchar  sched_savetm[DB_TIMESTAMP_LEN + 1];	/* sched save time on db */
	pbs_db_attr_list_t cache_attr_list;		/* list of attributes */
	pbs_db_attr_list_t db_attr_list;		/* list of attributes */
};
typedef struct pbs_db_sched_info pbs_db_sched_info_t;

/* Structure used to map database queue structure to C */
struct pbs_db_que_info {
	char    qu_name[PBS_MAXQUEUENAME +1]; 	/* queue name */
	INTEGER qu_type;			/* queue type: exec, route */
	BIGINTchar  qu_ctime;	creattm[DB_TIMESTAMP_LEN + 1];	/* time queue created */
	BIGINTchar  qu_mtime_savetm[DB_TIMESTAMP_LEN + 1];	/* time queue last modified */
	pbs_db_attr_list_t cache_attr_list; 	/* list of attributes */
	pbs_db_attr_list_t db_attr_list; 	/* list of attributes */
};
typedef struct pbs_db_que_info pbs_db_que_info_t;

/* Structure used to map database node structure to C */
struct pbs_db_node_info {
	char	 nd_name[PBS_MAXSERVERNAME+1]; 	/* vnode's name */
	INTEGER nd_index;			/* global node index */
	BIGINT	 mom_modtime; 			/* node config update time */
	char	 nd_hostname[PBS_MAXSERVERNAME+1]; 	/* node hostname */
	INTEGER nd_state;			/* state of node */
	INTEGER nd_ntype;			/* node type */
	char	 nd_pque[PBS_MAXSERVERNAME+1]; 	/* queue to which itnode belongs */
	BIGINTchar  nd_creattm; [DB_TIMESTAMP_LEN + 1];	/* node create time */
	BIGINTchar  nd_svtimesavetm[DB_TIMESTAMP_LEN + 1];	/* node save time */
	pbs_db_attr_list_t cache_attr_list;	/* list of attributes */
	pbs_db_attr_list_t db_attr_list;	/* list of attributes */
};
typedef struct pbs_db_node_info pbs_db_node_info_t;

/* Structure used to map database mominfo_time structure to C */
struct pbs_db_mominfo_time {
	BIGINT	mit_time; /* time of the host to vnode map */
	INTEGER mit_gen;  /* generation of the host to vnode map */
};
typedef struct pbs_db_mominfo_time pbs_db_mominfo_time_t;

/* Structure used to map database job script to C */
struct pbs_db_jobscr_info {
	char     ji_jobid[PBS_MAXSVRJOBID + 1]; /* job identifier */
	TEXT     script;	/* job script */
};
typedef struct pbs_db_jobscr_info pbs_db_jobscr_info_t;

...

pbs_db_query_options_t: Structure used to pass database query options to database functions. Flags field can be used to pass any flags to a query function. Timestamp field can be used to pass a timestamp, to return rows that have a modification timestamp newer (more recent) than the timestamp passed. (Basically to return rows that have been modified since a point of time)

Structure The structure used to pass database query options to database functions

...


pbs_db_attr_list_t: Structure used to map database attr structure to C.

Structure used to map database attr structure to C

...

The structure used to map database attr structure to C

Code Block
struct pbs_db_attr_list {
	int attr_count;			     /* attribute count */
	pbs_db_attr_info_t *attributeslist_head attrs; /* ptr to attr_info structure */
};
typedef struct pbs_db_attr_list pbs_db_attr_list_t;

...

int pbs_db_del_attr_obj(void *conn_db_handle, void *obj_id, char *sv_time, pbs_db_attr_list_t *cache_attr_list, pbs_db_attr_list_t *attr_list)

Parameters:

conn_db_handle[in]: Connection handler to the database which was created by pbs_db_connect.

...

sv_time[in]: Save time stamp for the delete operation.

cache_attr_list[in]: List of attributes to be deleted from cache.

attr_list[in]: List of attributes to be deleted from db.

Returns: Error code

0 - Success

...