@@ -15,13 +15,6 @@ namespace cheferd {
15
15
// Threshold to decide if a new should be enforced.
16
16
#define IOPS_THRESHOLD 10
17
17
18
- // Detailed information related to a data plane stage.
19
- struct StageInfoCore {
20
- std::string m_stage_name;
21
- std::string m_stage_env;
22
- std::string m_stage_user;
23
- std::string m_local_address;
24
- };
25
18
26
19
/* *
27
20
* CoreControlApplication class.
@@ -42,7 +35,8 @@ class CoreControlApplication : public ControlApplication {
42
35
std::queue<std::string> local_queue;
43
36
44
37
// Related to the registration of new data plane stages.
45
- std::queue<std::tuple<std::string, std::pair<std::string, std::string>, std::string>>
38
+ std::mutex pending_register_stage_lock_;
39
+ std::queue<std::unique_ptr<StageInfo>>
46
40
local_to_data_queue_;
47
41
48
42
// Type of control (e.g., Static, Dynamic, ...).
@@ -56,9 +50,9 @@ class CoreControlApplication : public ControlApplication {
56
50
// controller. (e.g., <"0.0.0.0:50052", ["job1+1", "job1+2"]>)
57
51
std::unordered_map<std::string, std::vector<std::string>> local_to_stages;
58
52
59
- // StageID -> StageInfoCore . Details each stage information.
60
- // (e.g., <"job1+1", StageInfoCore >)
61
- std::unordered_map<std::string, StageInfoCore > stage_info_detailed;
53
+ // StageID -> StageInfo . Details each stage information.
54
+ // (e.g., <"job1+1", StageInfo >)
55
+ std::unordered_map<std::string, std::unique_ptr<StageInfo> > stage_info_detailed;
62
56
63
57
// AppID -> < LocalControllerID -> [Envs] >. Holds info about the location and of each job
64
58
// instance. (e.g., <"job1", <"0.0.0.0:50052", [1,2]>>
@@ -157,7 +151,7 @@ class CoreControlApplication : public ControlApplication {
157
151
158
152
void operator () () override ;
159
153
160
- LocalControllerSession* register_local_controller_session (
154
+ void register_local_controller_session (
161
155
const std::string& local_controller_address);
162
156
163
157
void register_stage_session (const std::string& local_controller_address,
0 commit comments