hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Watt <sw...@us.ibm.com>
Subject TotalOrderPartitioner Functional Test - testmemcmp - Failing
Date Thu, 01 Apr 2010 20:03:10 GMT
Hi Folks

The Hadoop Functional Tests (hadoop-*-test.jar) that ship with it and can 
be run as part of the build, has a TestTotalOrderPartitioner JUNIT test 
cases in it. One of the assert's in the test case, "testmemcmp" passes 
with Sun Java but fails with IBM Java. The test iterates through a number 
of Text objects called splitStrings and writes them serially to a 
sequential file. The test case then iterates through a DIFFERENT Text 
array called testStrings and passes in the text value to the getPartition 
method to retrieve which partition the "key" is in. 

It fails on the assert when it tries to get the partition for the key "z" 
in which exists in the testStrings array but not in the splitStrings array 
(the values written in the sequential file).  The assert is expecting a 9 
value for the partition but it is getting a 0. They don't match, thus the 
assert fails.

To me, it seems, there is a bug in this test case. I have no idea why Sun 
Java returns a partition for this non-existent key. I'm new to partitions, 
so I wanted to run this by the list before I open a bug.

Kind regards
Steve Watt

View raw message