hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r1301551 - in /hadoop/common/trunk/hadoop-mapreduce-project: CHANGES.txt hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestWritableJobConf.java
Date Fri, 16 Mar 2012 14:39:02 GMT
Author: bobby
Date: Fri Mar 16 14:39:01 2012
New Revision: 1301551

URL: http://svn.apache.org/viewvc?rev=1301551&view=rev
Log:
MAPREDUCE-4010.  TestWritableJobConf fails on trunk (tucu via bobby)

Modified:
    hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestWritableJobConf.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=1301551&r1=1301550&r2=1301551&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Fri Mar 16 14:39:01 2012
@@ -158,6 +158,8 @@ Release 0.23.3 - UNRELEASED
 
     MAPREDUCE-3431 NPE in Resource Manager shutdown. (stevel)
 
+    MAPREDUCE-4010.  TestWritableJobConf fails on trunk (tucu via bobby)
+
 Release 0.23.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestWritableJobConf.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestWritableJobConf.java?rev=1301551&r1=1301550&r2=1301551&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestWritableJobConf.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestWritableJobConf.java
Fri Mar 16 14:39:01 2012
@@ -57,20 +57,25 @@ public class TestWritableJobConf extends
   }
 
   private void assertEquals(Configuration conf1, Configuration conf2) {
-    assertEquals(conf1.size(), conf2.size());
-
+    // We ignore deprecated keys because after deserializing, both the
+    // deprecated and the non-deprecated versions of a config are set.
+    // This is consistent with both the set and the get methods.
     Iterator<Map.Entry<String, String>> iterator1 = conf1.iterator();
     Map<String, String> map1 = new HashMap<String,String>();
     while (iterator1.hasNext()) {
       Map.Entry<String, String> entry = iterator1.next();
-      map1.put(entry.getKey(), entry.getValue());
+      if (!Configuration.isDeprecated(entry.getKey())) {
+        map1.put(entry.getKey(), entry.getValue());
+      }
     }
 
-    Iterator<Map.Entry<String, String>> iterator2 = conf1.iterator();
+    Iterator<Map.Entry<String, String>> iterator2 = conf2.iterator();
     Map<String, String> map2 = new HashMap<String,String>();
     while (iterator2.hasNext()) {
       Map.Entry<String, String> entry = iterator2.next();
-      map2.put(entry.getKey(), entry.getValue());
+      if (!Configuration.isDeprecated(entry.getKey())) {
+        map2.put(entry.getKey(), entry.getValue());
+      }
     }
 
     assertEquals(map1, map2);



Mime
View raw message