[ 
https://issues.apache.org/jira/browse/MAPREDUCE-4010?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13230458#comment-13230458
 ] 

Robert Joseph Evans commented on MAPREDUCE-4010:
------------------------------------------------

The assert equals bug is fixed by the following patch
{noformat}
diff --git 
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestWritableJobConf.java
 hadoop-mapreduce-project/hadoop
index c3996b2..e8dff93 100644
--- 
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestWritableJobConf.java
+++ 
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestWritableJobConf.java
@@ -66,7 +66,7 @@ public class TestWritableJobConf extends TestCase {
       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();
{noformat}

Once the test is fixed it is not just the size comparison that fails but also 
the comparison of the config objects.  The only way to fix these failures is to 
take into account the deprecated configs when comparing both the size and the 
values of the Configuration objects.  Your first patch takes the deprecated 
values into account when comparing.  The second patch does not.

I don't like the first patch having to expose a new API, and if you can think 
of a good way to fix the test without needing that API, I would love it.  But I 
do not see any way to do that, and keep the tests still loading values from the 
*-default.xml files. 
                
> TestWritableJobConf fails on trunk
> ----------------------------------
>
>                 Key: MAPREDUCE-4010
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4010
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: mrv2
>    Affects Versions: 0.24.0
>            Reporter: Jason Lowe
>            Assignee: Alejandro Abdelnur
>            Priority: Critical
>             Fix For: 0.23.3
>
>         Attachments: MAPREDUCE-4010.patch, MAPREDUCE-4010.patch
>
>
> TestWritableJobConf is currently failing two tests on trunk:
> * testEmptyConfiguration
> * testNonEmptyConfiguration
> Appears to have been caused by HADOOP-8167.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to