00001 #ifndef __EDG_WORKLOAD_LOGGING_CLIENT_JOBSTAT_H__
00002 #define __EDG_WORKLOAD_LOGGING_CLIENT_JOBSTAT_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00017 #ident "$Header: /cvs/glite/org.glite.lb.client-interface/interface/Attic/jobstat.h.T,v 1.4.2.4 2007/08/03 08:27:38 zsalvet Exp $"
00018
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00033 enum edg_wll_StatJobtype {
00034 EDG_WLL_STAT_SIMPLE,
00035 EDG_WLL_STAT_DAG,
00036 EDG_WLL_STAT__PARTITIONABLE_UNUSED,
00037 EDG_WLL_STAT__PARTITIONED_UNUSED,
00038 EDG_WLL_STAT_COLLECTION,
00039 EDG_WLL_STAT_PBS,
00040 EDG_WLL_STAT_CONDOR,
00041 EDG_WLL_NUMBER_OF_JOBTYPES
00042 };
00043 enum edg_wll_StatDone_code {
00044 EDG_WLL_STAT_OK,
00045 EDG_WLL_STAT_FAILED,
00046 EDG_WLL_STAT_CANCELLED,
00047 EDG_WLL_NUMBER_OF_DONE_CODES
00048 };
00049
00050
00056 typedef enum _edg_wll_JobStatCode {
00058 EDG_WLL_JOB_UNDEF = 0,
00059 EDG_WLL_JOB_SUBMITTED,
00060 EDG_WLL_JOB_WAITING,
00061 EDG_WLL_JOB_READY,
00062 EDG_WLL_JOB_SCHEDULED,
00063 EDG_WLL_JOB_RUNNING,
00064 EDG_WLL_JOB_DONE,
00065 EDG_WLL_JOB_CLEARED,
00066 EDG_WLL_JOB_ABORTED,
00067 EDG_WLL_JOB_CANCELLED,
00068 EDG_WLL_JOB_UNKNOWN,
00069 EDG_WLL_JOB_PURGED,
00070 EDG_WLL_NUMBER_OF_STATCODES
00071 } edg_wll_JobStatCode;
00072
00077 typedef struct _edg_wll_TagValue {
00078 char * tag;
00079 char * value;
00080 } edg_wll_TagValue;
00081
00082
00089 struct _pad_JobStatus_0_dont_use { edg_wll_JobStatCode state;edg_wlc_JobId jobId; char * owner; int jobtype; edg_wlc_JobId parent_job; char * seed; int children_num; char ** children; int * children_hist; struct _edg_wll_JobStat * children_states; char * condorId; char * globusId; char * localId; char * jdl; char * matched_jdl; char * destination; char * condor_jdl; char * rsl; char * reason; char * location; char * ce_node; char * network_server; int subjob_failed; int done_code; int exit_code; int resubmitted; int cancelling; char * cancelReason; int cpuTime; edg_wll_TagValue * user_tags; struct timeval stateEnterTime; struct timeval lastUpdateTime; int * stateEnterTimes; int expectUpdate; char * expectFrom; char * acl; int payload_running; char ** possible_destinations; char ** possible_ce_nodes; int suspended; char * suspend_reason; char * failure_reasons; char * ui_host; };
00090 struct _pad_JobStatus_1_dont_use { char * pbs_state; char * pbs_queue; char * pbs_owner; char * pbs_name; char * pbs_reason; char * pbs_scheduler; char * pbs_dest_host; int pbs_pid; char * pbs_resource_usage; int pbs_exit_status; char * pbs_error_desc; };
00091 struct _pad_JobStatus_2_dont_use { char * condor_status; char * condor_universe; char * condor_owner; char * condor_preempting; int condor_shadow_pid; int condor_shadow_exit_status; int condor_starter_pid; int condor_starter_exit_status; int condor_job_pid; int condor_job_exit_status; char * condor_dest_host; char * condor_reason; char * condor_error_desc; };
00092
00093 typedef struct _edg_wll_JobStat {
00094 edg_wll_JobStatCode state;
00095 edg_wlc_JobId jobId;
00096 char * owner;
00097 enum edg_wll_StatJobtype jobtype;
00098 edg_wlc_JobId parent_job;
00099 char * seed;
00100 int children_num;
00101 char ** children;
00102 int * children_hist;
00103 struct _edg_wll_JobStat * children_states;
00104 char * condorId;
00105 char * globusId;
00106 char * localId;
00107 char * jdl;
00108 char * matched_jdl;
00109 char * destination;
00110 char * condor_jdl;
00111 char * rsl;
00112 char * reason;
00113 char * location;
00114 char * ce_node;
00115 char * network_server;
00116 int subjob_failed;
00117 enum edg_wll_StatDone_code done_code;
00118 int exit_code;
00119 int resubmitted;
00120 int cancelling;
00121 char * cancelReason;
00122 int cpuTime;
00123 edg_wll_TagValue * user_tags;
00124 struct timeval stateEnterTime;
00125 struct timeval lastUpdateTime;
00126 int * stateEnterTimes;
00127 int expectUpdate;
00128 char * expectFrom;
00129 char * acl;
00130 int payload_running;
00131 char ** possible_destinations;
00132 char ** possible_ce_nodes;
00133 int suspended;
00134 char * suspend_reason;
00135 char * failure_reasons;
00136 char * ui_host;
00138 char _pad_0[sizeof(void *) * 55 - sizeof(struct _pad_JobStatus_0_dont_use)];
00139
00140 char * pbs_state;
00141 char * pbs_queue;
00142 char * pbs_owner;
00143 char * pbs_name;
00144 char * pbs_reason;
00145 char * pbs_scheduler;
00146 char * pbs_dest_host;
00147 int pbs_pid;
00148 char * pbs_resource_usage;
00149 int pbs_exit_status;
00150 char * pbs_error_desc;
00152 char _pad_1[sizeof(void *) * 20 - sizeof(struct _pad_JobStatus_1_dont_use)];
00153
00154 char * condor_status;
00155 char * condor_universe;
00156 char * condor_owner;
00157 char * condor_preempting;
00158 int condor_shadow_pid;
00159 int condor_shadow_exit_status;
00160 int condor_starter_pid;
00161 int condor_starter_exit_status;
00162 int condor_job_pid;
00163 int condor_job_exit_status;
00164 char * condor_dest_host;
00165 char * condor_reason;
00166 char * condor_error_desc;
00168 char _pad_2[sizeof(void *) * 25 - sizeof(struct _pad_JobStatus_2_dont_use)];
00169
00170
00171 } edg_wll_JobStat;
00172
00182 extern int edg_wll_InitStatus(edg_wll_JobStat *);
00183
00188 extern edg_wll_JobStat *edg_wll_CpyStatus(const edg_wll_JobStat *,edg_wll_JobStat *);
00189
00194 extern void edg_wll_FreeStatus(edg_wll_JobStat *);
00195
00199 extern edg_wll_JobStatCode edg_wll_StringToStat(const char *);
00200
00204 extern char *edg_wll_StatToString(edg_wll_JobStatCode);
00205
00208
00209
00210
00211
00212 #ifdef __cplusplus
00213 }
00214 #endif
00215
00216 #endif