Commit 9f21c02f authored by feng's avatar feng

Order inversion 2

parent 17f6c634
This diff is collapsed.
......@@ -112,8 +112,8 @@ public class OrderInversion extends Configured implements Tool {
job.setInputFormatClass(TextInputFormat.class);
// TODO: set map class and the map output key and value classes
job.setMapperClass(PairMapper.class);
job.setMapOutputValueClass(DoubleWritable.class);
job.setMapOutputKeyClass(IntWritable.class);
job.setMapOutputValueClass(IntWritable.class);
job.setMapOutputKeyClass(TextPair.class);
// TODO: set reduce class and the reduce output key and value classes
job.setReducerClass(PairReducer.class);
job.setOutputKeyClass(DoubleWritable.class);
......
......@@ -59,7 +59,6 @@ public class StringToIntMapWritable implements Writable {
int size = hashMap.size();
IntWritable sizeWritable = new IntWritable(size);
sizeWritable.write(out);
Set<Text> keys = hashMap.keySet();
Iterator iterator = keys.iterator();
while (iterator.hasNext()) {
......
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