|
MP7 MapReduce
|
Go to the source code of this file.
Data Structures | |
| struct | mapreduce_t |
Functions | |
| void | mapreduce_init (mapreduce_t *mr, void(*mymap)(int, const char *), const char *(*myreduce)(const char *, const char *)) |
| This function will be the first call made to the libmapreduce library. | |
| void | mapreduce_map_all (mapreduce_t *mr, const char **values) |
| Main function of this MP. | |
| void | mapreduce_reduce_all (mapreduce_t *mr) |
| This function should block until all map()'ing and reduce()'ing has completed. | |
| const char * | mapreduce_get_value (mapreduce_t *mr, const char *result_key) |
| This function should return the current value of result_key. | |
| void | mapreduce_destroy (mapreduce_t *mr) |
| Free all memory. | |
| void mapreduce_destroy | ( | mapreduce_t * | mr | ) |
Free all memory.
Will always be called last.
| const char* mapreduce_get_value | ( | mapreduce_t * | mr, |
| const char * | result_key | ||
| ) |
This function should return the current value of result_key.
If the result_key does not exist, return NULL.
This function should return the current value of result_key.
(See the MP description for full details.)
| void mapreduce_init | ( | mapreduce_t * | mr, |
| void(*)(int, const char *) | mymap, | ||
| const char *(*)(const char *, const char *) | myreduce | ||
| ) |
This function will be the first call made to the libmapreduce library.
You should put any initialization logic here
| mymap | map function |
| myreduce | reduce function |
| void mapreduce_map_all | ( | mapreduce_t * | mr, |
| const char ** | values | ||
| ) |
Main function of this MP.
| values | contains a NULL-terminated array of C-strings. |
Main function of this MP.
(See the MP description for full details.)
| void mapreduce_reduce_all | ( | mapreduce_t * | mr | ) |
This function should block until all map()'ing and reduce()'ing has completed.
This function should block until all map()'ing and reduce()'ing has completed.
(See the MP description for full details.)