PilotJob.h
1 
10 #ifndef WRENCH_PILOTJOB_H
11 #define WRENCH_PILOTJOB_H
12 
13 //#include "wrench/services/compute/ComputeService.h"
14 #include "wrench/workflow/job/WorkflowJob.h"
15 
16 namespace wrench {
17 
18 
19  /***********************/
21  /***********************/
22 
27  class PilotJob : public WorkflowJob {
28 
29  public:
30 
32  enum State {
45  };
46 
47  std::shared_ptr<ComputeService> getComputeService();
48 
50 
51  unsigned long getPriority();
52 
53  /***********************/
55  /***********************/
56 
57 
58  void setComputeService(std::shared_ptr<ComputeService> cs);
59 
60  /***********************/
62  /***********************/
63 
64  private:
65 
66  friend class JobManager;
67 
69 
70  State state;
71  std::shared_ptr<ComputeService> compute_service; // Associated compute service, i.e., the running pilot job
72  };
73 
74  /***********************/
76  /***********************/
77 
78 };
79 
80 
81 #endif //WRENCH_PILOTJOB_H
@ PENDING
Submitted but not running.
Definition: PilotJob.h:36
unsigned long getPriority()
Get the pilot job priority value.
Definition: PilotJob.cpp:38
@ NOT_SUBMITTED
Not submitted yet.
Definition: PilotJob.h:34
A helper daemon (co-located with and explicitly started by a WMS), which is used to handle all job ex...
Definition: JobManager.h:40
@ EXPIRED
Expired due to a time-to-live limit.
Definition: PilotJob.h:40
@ TERMINATED
Terminated by submitter.
Definition: PilotJob.h:44
Definition: Alarm.cpp:20
A workflow (to be executed by a WMS)
Definition: Workflow.h:34
@ RUNNING
Running.
Definition: PilotJob.h:38
Workflow * workflow
The workflow this job belong to.
Definition: WorkflowJob.h:91
Abstraction of a job used for executing tasks in a Workflow.
Definition: WorkflowJob.h:34
State
Pilot job states.
Definition: PilotJob.h:32
@ FAILED
Failed.
Definition: PilotJob.h:42
PilotJob::State getState()
Get the state of the pilot job.
Definition: PilotJob.cpp:30
A pilot (i.e., non-standard) workflow job that can be submitted to a ComputeService by a WMS (via a J...
Definition: PilotJob.h:27
std::shared_ptr< ComputeService > getComputeService()
Get the compute service provided by the (running) pilot job.
Definition: PilotJob.cpp:47
void setComputeService(std::shared_ptr< ComputeService > cs)
Set the compute service on which the pilot job is running.
Definition: PilotJob.cpp:55