merge job rusage and pending reason support

This commit is contained in:
Rongsong Shen 2025-12-16 14:36:28 +08:00
parent 30824ae5ea
commit cb0c7fe9e7
82 changed files with 4280 additions and 2561 deletions

View file

@ -28,6 +28,8 @@ enum OPCode {
clusterconf @17;
queuecontrol @18;
runtasks @19;
setpreason @20;
clrpreason @21;
}
struct PeerInfo $C.mapname("xce_peerinfo_t") {
@ -35,6 +37,23 @@ struct PeerInfo $C.mapname("xce_peerinfo_t") {
key @1: Text;
}
struct HostBasedReason $C.mapname("xce_host_reason_t") {
host @0: Text;
reason @1: UInt32;
}
struct ResourceBasedReason $C.mapname("xce_res_reason_t") {
resource @0: Text;
host @1: Text;
reason @2: UInt32;
}
struct JobPendReason $C.mapname("xce_job_preason_t") {
mainReason @0: UInt32 $C.mapname("main_reason");
hostReasons @1: List(HostBasedReason) $C.mapname("host_based_reasons") $C.maplistcount("nhost_reasons");
resReasons @2: List(ResourceBasedReason) $C.mapname("res_based_reasons") $C.maplistcount("nres_reasons");
}
struct StrList $C.mapname("xce_strlist_t") {
data @0: List(Text) $C.mapname("data") $C.maplistcount("count");
}
@ -242,6 +261,7 @@ struct Job $C.mapname("xce_job_t"){
allocs @8: JobAlloc $C.mapname("allocs");
runtime @9: UInt32 $C.mapname("run_time");
pidinfo @10: JobPIDInfo;
pendreason @11: JobPendReason $C.mapname("pend_reasons");
}
struct SchedJob $C.mapname("xce_job_t"){
@ -257,6 +277,11 @@ struct SchedJob $C.mapname("xce_job_t"){
runtime @9: UInt32 $C.mapname("run_time");
}
struct SchedJobRusages $C.mapname("xce_job_rusages_t") {
jobid @0: UInt64 $C.mapname("jobid");
usages @1: List(ResUsage) $C.mapname("usages") $C.maplistcount("count");
}
struct JobData $C.mapname("xce_jobs_data_t") {
ntotal @0: UInt32 $C.mapname("n_total");
pos @1: UInt32;
@ -422,6 +447,7 @@ struct NotifyData $C.mapname("xce_notify_data_t"){
taskFailInfo @14: TaskFailInfo $C.mapname("taskfailinfo");
taskFinish @15: TaskFinish $C.mapname("taskfinish");
postDoneJob @16: UInt64 $C.mapname("pdone_job");
schedJobRusages @17: SchedJobRusages $C.mapname("sched_job_rusages");
}
}
@ -510,6 +536,19 @@ struct RunTask $C.mapname("xce_taskrun_t") {
jobid @2: UInt64 $C.mapname("jobid");
}
struct PendReason $C.mapname("xce_pendreason_t") {
jobid @0: UInt64 $C.mapname("jobid");
reasons @1: JobPendReason $C.mapname("reasons");
}
struct PendReasonSet $C.mapname("xce_preason_set_t") {
reason @0: List(PendReason) $C.mapname("reasons") $C.maplistcount("nreasons");
}
struct ClearPReason $C.mapname("xce_clear_reason_t") {
jobs @0: List(UInt64) $C.mapname("jobs") $C.maplistcount("njobs");
}
struct Request $C.mapname("xce_request_t"){
opcode @0: OPCode;
seq @1: UInt64;
@ -531,6 +570,8 @@ struct Request $C.mapname("xce_request_t"){
jobctrlmsg @16: JobControl;
queuectrlmsg @17: QueueControl;
runtaskmsg @18: RunTask;
preasonmsg @19: PendReasonSet;
clrpreasonmsg @20: ClearPReason;
}
}
@ -561,6 +602,14 @@ struct HostConfig $C.mapname("xce_hostconfig_t") {
dispatchwindows @6: TimeWindow $C.mapname("dispatchwindow");
}
struct ScalerConfig $C.mapname("scaler_config_t") {
name @0: Text $C.mapname("name");
type @1: Text $C.mapname("prov_type");
confPath @2: Text $C.mapname("conf_path");
scriptPath @3: Text $C.mapname("script_path");
scriptOption @4: Text $C.mapname("script_option");
}
struct ClusterConfig $C.mapname("cluster_config_t") {
clusterName @0: Text $C.mapname("clustername");
port @1: UInt32 $C.mapname("port");
@ -580,4 +629,5 @@ struct ClusterConfig $C.mapname("cluster_config_t") {
qmgr @15: HashZArrayConfig;
resmgr @16: ResmgrConfig;
xstrings @17: HashZArrayConfig;
hproviders @18: List(ScalerConfig) $C.mapname("hproviders") $C.maplistcount("nhproviders");
}