working on scheduler and fix issue #17
This commit is contained in:
parent
4034fd7556
commit
a46ea822c1
10 changed files with 159 additions and 40 deletions
|
|
@ -19,6 +19,8 @@ typedef int (*plugin_update_job_hook_t)(void*, xce_sched_job_t*,
|
|||
xce_sched_job_t*);
|
||||
typedef int (*plugin_update_worker_hook_t)(void*, xce_sched_worker_t*,
|
||||
xce_sched_worker_t*);
|
||||
typedef int (*plugin_job_state_change_hook_t)(void*, xce_sched_job_t*,
|
||||
uint32_t);
|
||||
typedef int (*plugin_commit_decision_hook_t)(void*, xce_decision_t*);
|
||||
|
||||
/* initialize function of plugin */
|
||||
|
|
@ -37,11 +39,12 @@ typedef xce_job_alloc_t* (*plugin_job_allocate_fn_t)(void*, int64_t,
|
|||
xce_pendreason_t**);
|
||||
|
||||
typedef struct {
|
||||
plugin_update_config_hook_t config_hook;
|
||||
plugin_update_queue_hook_t queue_hook;
|
||||
plugin_update_job_hook_t job_hook;
|
||||
plugin_update_worker_hook_t worker_hook;
|
||||
plugin_commit_decision_hook_t commit_hook;
|
||||
plugin_update_config_hook_t config_hook;
|
||||
plugin_update_queue_hook_t queue_hook;
|
||||
plugin_update_job_hook_t job_hook;
|
||||
plugin_job_state_change_hook_t jstate_hook;
|
||||
plugin_update_worker_hook_t worker_hook;
|
||||
plugin_commit_decision_hook_t commit_hook;
|
||||
} plugin_hooks_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
@ -64,6 +67,7 @@ extern int plugin_queue_update(void*, xce_sched_queue_t*, xce_sched_queue_t*);
|
|||
extern int plugin_job_update(void*, xce_sched_job_t*, xce_sched_job_t*);
|
||||
extern int plugin_worker_update(void*, xce_sched_worker_t*,
|
||||
xce_sched_worker_t*);
|
||||
extern int plugin_job_state_change(void*, xce_sched_job_t*, uint32_t);
|
||||
extern int plugin_begin_session(void*);
|
||||
extern int plugin_end_session(void*);
|
||||
extern int plugin_commit_decision(void*, xce_decision_t*);
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ typedef enum {
|
|||
XCE_SCHED_OP_NONE = 0,
|
||||
XCE_SCHED_OP_UPDATE_CONFIG,
|
||||
XCE_SCHED_OP_UPDATE_JOB,
|
||||
XCE_SCHED_OP_JSTATE_CHANGE,
|
||||
XCE_SCHED_OP_UPDATE_WORKER
|
||||
} xce_sched_op_t;
|
||||
|
||||
|
|
@ -35,6 +36,10 @@ typedef struct {
|
|||
int nworkers;
|
||||
xce_worker_t** workers;
|
||||
} workerupdate;
|
||||
struct {
|
||||
uint64_t jobid;
|
||||
uint32_t state;
|
||||
} job_state_change;
|
||||
} u;
|
||||
} xce_sched_update_request_t;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue