-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmap_reduce.h
More file actions
28 lines (22 loc) · 1.09 KB
/
map_reduce.h
File metadata and controls
28 lines (22 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#ifndef MAP_REDUCE_MAP_REDUCE_H
#define MAP_REDUCE_MAP_REDUCE_H
#include <filesystem>
#include <vector>
#include <memory>
#include <string>
#include <future>
#include "types/KeyValueType.h"
namespace map_reduce {
namespace fs = std::filesystem;
std::future<std::vector<std::pair<std::unique_ptr<KeyValueType>, std::unique_ptr<KeyValueType>>>>
run_task(const std::vector<std::string> &map_ips, const std::string &reduce_address,
const std::string &master_address,
const std::vector<fs::path> &map_input_files, const fs::path &dll_path);
std::vector<std::pair<std::unique_ptr<KeyValueType>, std::unique_ptr<KeyValueType>>>
run_task_blocking(const std::vector<std::string> &map_ips, const std::string &reduce_address,
const std::string &master_address, const std::vector<fs::path> &map_input_files,
const fs::path &dll_path);
}
#endif //MAP_REDUCE_MAP_REDUCE_H