You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-user@hadoop.apache.org by Stephen Watt <sw...@us.ibm.com> on 2010/04/01 22:03:10 UTC
TotalOrderPartitioner Functional Test - testmemcmp - Failing
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