hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1195745 - in /hadoop/common/trunk/hadoop-mapreduce-project: CHANGES.txt src/test/mapred/org/apache/hadoop/mapred/TestCombineOutputCollector.java
Date Tue, 01 Nov 2011 01:04:15 GMT
Author: acmurthy
Date: Tue Nov  1 01:04:15 2011
New Revision: 1195745

URL: http://svn.apache.org/viewvc?rev=1195745&view=rev
Log:
MAPREDUCE-3220. Fixed TestCombineOutputCollector. Contributed by Devaraj K.

Modified:
    hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/trunk/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/mapred/TestCombineOutputCollector.java

Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1195745&r1=1195744&r2=1195745&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Tue Nov  1 01:04:15 2011
@@ -1892,6 +1892,8 @@ Release 0.23.0 - Unreleased
     MAPREDUCE-3321. Disabled a few MR tests for 0.23. (Hitesh Shah via
     acmurthy) 
 
+    MAPREDUCE-3220. Fixed TestCombineOutputCollector. (Devaraj K via acmurthy) 
+
 Release 0.22.0 - Unreleased
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/mapred/TestCombineOutputCollector.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/mapred/TestCombineOutputCollector.java?rev=1195745&r1=1195744&r2=1195745&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/mapred/TestCombineOutputCollector.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/mapred/TestCombineOutputCollector.java
Tue Nov  1 01:04:15 2011
@@ -31,17 +31,17 @@ import org.apache.hadoop.mapred.Counters
 import org.apache.hadoop.mapred.IFile.Writer;
 import org.apache.hadoop.mapred.Task.CombineOutputCollector;
 import org.apache.hadoop.mapred.Task.TaskReporter;
+import org.apache.hadoop.mapreduce.MRJobConfig;
 import org.junit.Test;
 
 public class TestCombineOutputCollector {
   private CombineOutputCollector<String, Integer> coc;
 
   Counters.Counter outCounter = new Counters.Counter() {
-    
+    private long value;
     @Override
     public void setValue(long value) {
-      // TODO Auto-generated method stub
-      
+      this.value = value;
     }
     
     @Override
@@ -52,14 +52,12 @@ public class TestCombineOutputCollector 
     
     @Override
     public void increment(long incr) {
-      // TODO Auto-generated method stub
-      
+      this.value += incr;
     }
     
     @Override
     public long getValue() {
-      // TODO Auto-generated method stub
-      return 0;
+      return value;
     }
     
     @Override
@@ -82,8 +80,7 @@ public class TestCombineOutputCollector 
     
     @Override
     public long getCounter() {
-      // TODO Auto-generated method stub
-      return 0;
+      return value;
     }
     
     @Override
@@ -108,7 +105,7 @@ public class TestCombineOutputCollector 
     Writer<String, Integer> mockWriter = mock(Writer.class);
 
     Configuration conf = new Configuration();
-    conf.set("mapred.combine.recordsBeforeProgress", "2");
+    conf.set(MRJobConfig.COMBINE_RECORDS_BEFORE_PROGRESS, "2");
     
     coc = new CombineOutputCollector<String, Integer>(outCounter, mockTaskReporter,
conf);
     coc.setWriter(mockWriter);



Mime
View raw message