header file
This commit is contained in:
@@ -90,8 +90,9 @@ infrastructure does the rest.
|
||||
|
||||
## Code Overview
|
||||
|
||||
We give you here `mapreduce.h` file that specifies exactly what you must build
|
||||
in your MapReduce library:
|
||||
We give you here the
|
||||
[`mapreduce.h`](https://github.com/remzi-arpacidusseau/ostep-projects/tree/master/concurrency-mapreduce/mapreduce.h)
|
||||
header file that specifies exactly what you must build in your MapReduce library:
|
||||
|
||||
```
|
||||
#ifndef __mapreduce_h__
|
||||
|
||||
19
concurrency-mapreduce/mapreduce.h
Normal file
19
concurrency-mapreduce/mapreduce.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef __mapreduce_h__
|
||||
#define __mapreduce_h__
|
||||
|
||||
typedef char *(*Getter)();
|
||||
|
||||
typedef void (*Mapper)(char *file_name);
|
||||
typedef void (*Reducer)(char *key, Getter get_func, int partition_number);
|
||||
typedef unsigned long (*Partitioner)(char *key, int num_buckets);
|
||||
|
||||
void MR_Emit(char *key, char *value);
|
||||
|
||||
unsigned long MR_DefaultHashPartition(char *key, int num_buckets);
|
||||
|
||||
void MR_Run(int argc, char *argv[],
|
||||
Mapper map, int num_mappers,
|
||||
Reducer reduce, int num_reducers,
|
||||
Partitioner partition);
|
||||
|
||||
#endif // __mapreduce_h__
|
||||
Reference in New Issue
Block a user