1 2 3 4 package net.nutch.mapReduce; 5 6 import java.io.IOException ; 7 8 import java.util.Iterator ; 9 10 import net.nutch.io.Writable; 11 import net.nutch.io.WritableComparable; 12 13 15 public class DefaultReducer implements Reducer { 16 17 18 public void reduce (WritableComparable key, Iterator values, 19 OutputCollector results) throws IOException { 20 while (values.hasNext()) { 21 results.collect(key, (Writable)values.next()); 22 } 23 } 24 25 } 26 | Popular Tags |