Did you override the equals and hashcode methods?  These are the
methods usually used in a map to determine equality for put/get
operations.  The comparator is probably only used for sorting, not
equality checks.



On Fri, Aug 29, 2008 at 2:55 AM, P.ILAYARAJA <[EMAIL PROTECTED]> wrote:
>
> Hello:
>
> I wrote a simple Map/Reduce program. The ouput key of the Map function is a 
> user defined datum(class)
> with two member strings. The OutputKeyComparatorClass is set to this datum 
> class and the class
> overrides the "compareTo" function.
>
> The problem is the final MapOutput from reduce has the same "key" occuring in 
> more than one record.
> Any thougts on why this could happen?
>
> Also I see that the compareTo function never gets as input the pair of "keys" 
> that are same for comparison.....
>
> Regards,
> Ilay

Reply via email to