Author: tomwhite Date: Thu Jun 14 13:22:45 2007 New Revision: 547393 URL: http://svn.apache.org/viewvc?view=rev&rev=547393 Log: HADOOP-1467. Remove redundant counters from WordCount example. Contributed by Owen O'Malley.
Modified: lucene/hadoop/trunk/CHANGES.txt lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/WordCount.java Modified: lucene/hadoop/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=547393&r1=547392&r2=547393 ============================================================================== --- lucene/hadoop/trunk/CHANGES.txt (original) +++ lucene/hadoop/trunk/CHANGES.txt Thu Jun 14 13:22:45 2007 @@ -114,6 +114,9 @@ 36. HADOOP-1396. Fix FileNotFoundException on DFS block. (Dhruba Borthakur via tomwhite) + 37. HADOOP-1467. Remove redundant counters from WordCount example. + (Owen O'Malley via tomwhite) + Release 0.13.0 - 2007-06-08 Modified: lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/WordCount.java URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/WordCount.java?view=diff&rev=547393&r1=547392&r2=547393 ============================================================================== --- lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/WordCount.java (original) +++ lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/WordCount.java Thu Jun 14 13:22:45 2007 @@ -47,9 +47,6 @@ */ public class WordCount { - // These are just for testing counters - private enum Counter { WORDS, VALUES } - /** * Counts the words in each line. * For each line of input, break the line into words and emit them as @@ -68,7 +65,6 @@ while (itr.hasMoreTokens()) { word.set(itr.nextToken()); output.collect(word, one); - reporter.incrCounter(Counter.WORDS, 1); } } } @@ -84,7 +80,6 @@ int sum = 0; while (values.hasNext()) { sum += ((IntWritable) values.next()).get(); - reporter.incrCounter(Counter.VALUES, 1); } output.collect(key, new IntWritable(sum)); }