avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r1389598 - in /avro/trunk: ./ lang/java/mapred/src/main/java/org/apache/avro/mapred/ lang/java/mapred/src/test/java/org/apache/avro/mapred/
Date Mon, 24 Sep 2012 21:22:59 GMT
Author: cutting
Date: Mon Sep 24 21:22:59 2012
New Revision: 1389598

URL: http://svn.apache.org/viewvc?rev=1389598&view=rev
Log:
AVRO-1171. Java: Don't call configure() twice on mappers & reducers.  Contributed by Dave
Beech.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/HadoopMapper.java
    avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/HadoopReducerBase.java
    avro/trunk/lang/java/mapred/src/test/java/org/apache/avro/mapred/TestWeather.java

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1389598&r1=1389597&r2=1389598&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Mon Sep 24 21:22:59 2012
@@ -11,6 +11,9 @@ Trunk (not yet released)
 
   BUG FIXES
 
+    AVRO-1171. Java: Don't call configure() twice on mappers & reducers.
+    (Dave Beech via cutting)
+
 Avro 1.7.2 (20 October 2012)
 
   NEW FEATURES

Modified: avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/HadoopMapper.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/HadoopMapper.java?rev=1389598&r1=1389597&r2=1389598&view=diff
==============================================================================
--- avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/HadoopMapper.java (original)
+++ avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/HadoopMapper.java Mon
Sep 24 21:22:59 2012
@@ -45,7 +45,6 @@ class HadoopMapper<IN,OUT,K,V,KO,VO> ext
       (conf.getClass(AvroJob.MAPPER, AvroMapper.class, AvroMapper.class),
        conf);
     this.isMapOnly = conf.getNumReduceTasks() == 0;
-    this.mapper.configure(conf);
   }
 
   @SuppressWarnings("unchecked")

Modified: avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/HadoopReducerBase.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/HadoopReducerBase.java?rev=1389598&r1=1389597&r2=1389598&view=diff
==============================================================================
--- avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/HadoopReducerBase.java
(original)
+++ avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/HadoopReducerBase.java
Mon Sep 24 21:22:59 2012
@@ -39,7 +39,6 @@ abstract class HadoopReducerBase<K,V,OUT
   @Override
   public void configure(JobConf conf) {
     this.reducer = getReducer(conf);
-    this.reducer.configure(conf);
   }
 
   class ReduceIterable implements Iterable<V>, Iterator<V> {

Modified: avro/trunk/lang/java/mapred/src/test/java/org/apache/avro/mapred/TestWeather.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/mapred/src/test/java/org/apache/avro/mapred/TestWeather.java?rev=1389598&r1=1389597&r2=1389598&view=diff
==============================================================================
--- avro/trunk/lang/java/mapred/src/test/java/org/apache/avro/mapred/TestWeather.java (original)
+++ avro/trunk/lang/java/mapred/src/test/java/org/apache/avro/mapred/TestWeather.java Mon
Sep 24 21:22:59 2012
@@ -181,9 +181,8 @@ public class TestWeather {
     // check that AvroMapper and AvroReducer get close() and configure() called
     assertEquals(1, mapCloseCalls.get());
     assertEquals(1, reducerCloseCalls.get());
-    // gets called twice for some reason, so loosen this check
-    assertTrue(mapConfigureCalls.get() >= 1);
-    assertTrue(reducerConfigureCalls.get() >= 1);
+    assertEquals(1, mapConfigureCalls.get());
+    assertEquals(1, reducerConfigureCalls.get());
 
 
   }



Mime
View raw message