Logo
task_manager.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../nodes/node.hh"
4 #include "../messages/task_operation.hh"
5 #include "../common/shared_memory.hh"
6 #include "../common/context_singleton.hh"
7 #include <string>
8 #include <fstream>
9 #include <vector>
10 #include <map>
11 #include <memory>
12 
18  };
19 
20 namespace eclipse {
21 
22 using vec_str = std::vector<std::string>;
23 
24 class TaskManager : public Node {
25 
26 
27 
28 protected :
30  std::map <int, shared_ptr<int> > to_process_file;
31 public :
32 
34 
35  //bool read_from_disk_to_shm(ifstream& ifs, messages::BlockInfo& md, struct shm_buf** cur_chunk, int idx);
36  void task_init(std::string file, struct logical_block_metadata& assigned_chunks, std::string job_id, int task_id);
37 
38  ~TaskManager();
39 };
40 
41 }
Definition: node.hh:14
Definition: task_manager.hh:24
TaskManager(network::ClientHandler *)
Definition: task_manager.cc:21
int network_size
Definition: task_manager.hh:29
void task_init(std::string file, struct logical_block_metadata &assigned_chunks, std::string job_id, int task_id)
Definition: task_manager.cc:360
~TaskManager()
Definition: task_manager.cc:27
std::map< int, shared_ptr< int > > to_process_file
Definition: task_manager.hh:30
Definition: client_handler.hh:12
std::vector< std::string > vec_str
Definition: cli_driver.cc:10
Definition: block_node.cc:12
Definition: logical_block_metadata.hh:8
DistLockStatus
Definition: task_manager.hh:13
@ TRY_NEXT_DIST_LOCK
Definition: task_manager.hh:16
@ END_OF_FILE
Definition: task_manager.hh:15
@ GET_DIST_LOCK
Definition: task_manager.hh:14
@ ZOO_CREATE_ERROR
Definition: task_manager.hh:17