KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > nutch > mapReduce > DefaultMapper


1 /* Copyright (c) 2005 The Nutch Organization. All rights reserved. */
2 /* Use subject to the conditions in http://www.nutch.org/LICENSE.txt. */
3
4 package net.nutch.mapReduce;
5
6 import java.io.IOException JavaDoc;
7
8 import net.nutch.io.Writable;
9 import net.nutch.io.WritableComparable;
10
11 /** The default {@link Mapper}. Implements the identity function, mapping
12  * inputs directly to outputs. */

13 public class DefaultMapper implements Mapper {
14
15   /** The identify function. Input key/value pair is written directly to
16    * output.*/

17   public void map(WritableComparable key, Writable val,
18                   OutputCollector results) throws IOException JavaDoc {
19     results.collect(key, val);
20   }
21
22 }
23
Popular Tags