Commit a9b19c45 authored by dangq's avatar dangq

dsalkjfl

parent ac0a6dbb
......@@ -112,7 +112,6 @@ class StripesMapper extends
}
}
<<<<<<< HEAD:src/main/java/fr/eurecom/dsg/mapreduce/Stripes.java
class StripesReducer extends Reducer<Text, // input key type
StringToIntMapWritable, // input value type
Text, // output key type
......@@ -121,23 +120,7 @@ class StripesReducer extends Reducer<Text, // input key type
public void reduce(Text key, // input key type
Iterable<StringToIntMapWritable> values, // input value type
Context context) throws IOException, InterruptedException {
=======
class StripesReducer
extends Reducer<TextPair, // TODO: change Object to input key type
IntWritable, // TODO: change Object to input value type
TextPair, // TODO: change Object to output key type
IntWritable> { // TODO: change Object to output value type
@Override
public void reduce(TextPair key, // TODO: change Object to input key type
Iterable<IntWritable> values, // TODO: change Object to input value type
Context context) throws IOException, InterruptedException {
int accumulator = 0;
for (IntWritable value : values) {
accumulator += value.get();
}
>>>>>>> 7a98e76146298bed2deefdd460ad6b59720b3897:src/main/java/fr/eurecom/dsg/mapreduce/Stripes.java
<<<<<<< HEAD:src/main/java/fr/eurecom/dsg/mapreduce/Stripes.java
StringToIntMapWritable hf = new StringToIntMapWritable();
for (StringToIntMapWritable value : values) {
hf.sum(value);
......@@ -148,9 +131,4 @@ extends Reducer<TextPair, // TODO: change Object to input key type
}
}
=======
context.write(key, new IntWritable(accumulator));
// TODO: implement the reduce method
}
>>>>>>> 7a98e76146298bed2deefdd460ad6b59720b3897:src/main/java/fr/eurecom/dsg/mapreduce/Stripes.java
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment