HTCondorNegotiatorService.h
1 
10 #ifndef WRENCH_HTCONDORNEGOTIATORSERVICE_H
11 #define WRENCH_HTCONDORNEGOTIATORSERVICE_H
12 
13 #include "wrench/services/Service.h"
14 #include "wrench/services/compute/ComputeService.h"
15 #include "wrench/services/compute/htcondor/HTCondorCentralManagerServiceMessagePayload.h"
16 #include "wrench/workflow/job/WorkflowJob.h"
17 
18 namespace wrench {
19 
20  /***********************/
22  /***********************/
27  private:
28  std::map<std::string, double> default_messagepayload_values = {
32  };
33 
34  public:
35 
37  std::map<std::shared_ptr<ComputeService>, unsigned long> &compute_resources,
38  std::map<WorkflowJob *, std::shared_ptr<ComputeService>> &running_jobs,
39  std::vector<std::tuple<WorkflowJob *, std::map<std::string, std::string>>> &pending_jobs,
40  std::string &reply_mailbox);
41 
43 
44  private:
45  int main() override;
46 
47  struct JobPriorityComparator {
48  bool operator()(std::tuple<WorkflowJob *, std::map<std::string, std::string>> &lhs,
49  std::tuple<WorkflowJob *, std::map<std::string, std::string>> &rhs);
50  };
51 
53  std::string reply_mailbox;
55  std::map<std::shared_ptr<ComputeService>, unsigned long> *compute_resources;
56  std::map<WorkflowJob *, std::shared_ptr<ComputeService>> *running_jobs;
58  std::vector<std::tuple<WorkflowJob *, std::map<std::string, std::string>>> pending_jobs;
59  };
60 
61  /***********************/
63  /***********************/
64 }
65 
66 #endif //WRENCH_HTCONDORNEGOTIATORSERVICE_H
~HTCondorNegotiatorService()
Destructor.
Definition: HTCondorNegotiatorService.cpp:49
static const std::string DAEMON_STOPPED_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to confirm it has terminated.
Definition: ServiceMessagePayload.h:33
static const std::string HTCONDOR_NEGOTIATOR_DONE_MESSAGE_PAYLOAD
The number of bytes in the control message sent by the daemon to state that the negotiator has been c...
Definition: HTCondorCentralManagerServiceMessagePayload.h:23
Definition: Alarm.cpp:20
A HTCondor negotiator service.
Definition: HTCondorNegotiatorService.h:26
Abstraction of a job used for executing tasks in a Workflow.
Definition: WorkflowJob.h:34
HTCondorNegotiatorService(std::string &hostname, std::map< std::shared_ptr< ComputeService >, unsigned long > &compute_resources, std::map< WorkflowJob *, std::shared_ptr< ComputeService >> &running_jobs, std::vector< std::tuple< WorkflowJob *, std::map< std::string, std::string >>> &pending_jobs, std::string &reply_mailbox)
Constructor.
Definition: HTCondorNegotiatorService.cpp:34
static const std::string STOP_DAEMON_MESSAGE_PAYLOAD
The number of bytes in the control message sent to the daemon to terminate it.
Definition: ServiceMessagePayload.h:31
std::string hostname
The name of the host on which the daemon is running.
Definition: S4U_Daemon.h:51
A service that can be added to the simulation and that can be used by a WMS when executing a workflow...
Definition: Service.h:26