MAPREDUCE-1407. Update javadoc in mapreduce.{Mapper,Reducer} to match
actual usage. Contributed by Benoit Sigoure


git-svn-id: https://svn.apache.org/repos/asf/hadoop/mapreduce/branches/branch-0.21@925520 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CHANGES.txt b/CHANGES.txt
index 982ade9..006a0de 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -948,3 +948,6 @@
 
     MAPREDUCE-1522. FileInputFormat may use the default FileSystem for the
     input path. (Tsz Wo (Nicholas), SZE via cdouglas)
+
+    MAPREDUCE-1407. Update javadoc in mapreduce.{Mapper,Reducer} to match
+    actual usage. (Benoit Sigoure via cdouglas)
diff --git a/src/java/org/apache/hadoop/mapreduce/Mapper.java b/src/java/org/apache/hadoop/mapreduce/Mapper.java
index 23e8ad9..b8de6f5 100644
--- a/src/java/org/apache/hadoop/mapreduce/Mapper.java
+++ b/src/java/org/apache/hadoop/mapreduce/Mapper.java
@@ -69,16 +69,16 @@
  * <p>Example:</p>
  * <p><blockquote><pre>
  * public class TokenCounterMapper 
- *     extends Mapper<Object, Text, Text, IntWritable>{
+ *     extends Mapper&lt;Object, Text, Text, IntWritable&gt;{
  *    
  *   private final static IntWritable one = new IntWritable(1);
  *   private Text word = new Text();
  *   
- *   public void map(Object key, Text value, Context context) throws IOException {
+ *   public void map(Object key, Text value, Context context) throws IOException, InterruptedException {
  *     StringTokenizer itr = new StringTokenizer(value.toString());
  *     while (itr.hasMoreTokens()) {
  *       word.set(itr.nextToken());
- *       context.collect(word, one);
+ *       context.write(word, one);
  *     }
  *   }
  * }
@@ -141,4 +141,4 @@
     }
     cleanup(context);
   }
-}
\ No newline at end of file
+}
diff --git a/src/java/org/apache/hadoop/mapreduce/Reducer.java b/src/java/org/apache/hadoop/mapreduce/Reducer.java
index 13994e8..11d000a 100644
--- a/src/java/org/apache/hadoop/mapreduce/Reducer.java
+++ b/src/java/org/apache/hadoop/mapreduce/Reducer.java
@@ -84,7 +84,7 @@
  *   
  *   <p>In this phase the 
  *   {@link #reduce(Object, Iterable, Context)}
- *   method is called for each <code>&lt;key, (collection of values)></code> in
+ *   method is called for each <code>&lt;key, (collection of values)&gt;</code> in
  *   the sorted inputs.</p>
  *   <p>The output of the reduce task is typically written to a 
  *   {@link RecordWriter} via 
@@ -96,18 +96,18 @@
  * 
  * <p>Example:</p>
  * <p><blockquote><pre>
- * public class IntSumReducer<Key> extends Reducer<Key,IntWritable,
- *                                                 Key,IntWritable> {
+ * public class IntSumReducer&lt;Key&gt; extends Reducer&lt;Key,IntWritable,
+ *                                                 Key,IntWritable&gt; {
  *   private IntWritable result = new IntWritable();
  * 
- *   public void reduce(Key key, Iterable<IntWritable> values, 
- *                      Context context) throws IOException {
+ *   public void reduce(Key key, Iterable&lt;IntWritable&gt; values,
+ *                      Context context) throws IOException, InterruptedException {
  *     int sum = 0;
  *     for (IntWritable val : values) {
  *       sum += val.get();
  *     }
  *     result.set(sum);
- *     context.collect(key, result);
+ *     context.write(key, result);
  *   }
  * }
  * </pre></blockquote></p>