tahamajs/OS / Files /past_terms /Operating-System-Course-Projects /2.Map-Reduce-Genre-Counter /src /genre_counter.hpp
| class GenreCounter { | |
| public: | |
| GenreCounter(Log log); | |
| const std::map<std::string, int>& | |
| countGenres(); | |
| const std::map<std::string, int>& | |
| countGenres(const std::string& dir_name); | |
| void setDirName(const std::string& dir_name); | |
| void save_csv(const std::string& file_name); | |
| ~GenreCounter(); | |
| private: | |
| std::string dir_name_; | |
| std::map<std::string, int> genre_counts_; | |
| std::unordered_map<int, std::string> counting_processes_map_; | |
| std::vector<std::string> genres_; | |
| NamedPipeServer server_pipe_; | |
| Log log_; | |
| void fetchGenres(); | |
| std::vector<std::string> fetchParts(); | |
| void waitParts(); | |
| void waitStart(); | |
| void makeGenreProcesses(); | |
| void makeCounterProcesses(); | |
| void gatherResults(); | |
| }; | |
Xet Storage Details
- Size:
- 975 Bytes
- Xet hash:
- d58701a88ac3181b62f326a95179348639d5296a457cbf3367b90c6132cef6c9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.