|
[
Permlink
| « Hide
]
Owen O'Malley added a comment - 30/Oct/08 05:24 AM
Here is an example.
Looks good. A unit test using this example would also be helpful; there aren't many tests that use the grouping comparator.
This patch:
1. Updates the example to the new map/reduce api 2. Adds a unit test case. Integrated in Hadoop-trunk #698 (See http://hudson.zones.apache.org/hudson/job/Hadoop-trunk/698/
In the example, is there a typo in the hashCode function of IntPair?
public int hashCode() {
return first * 157 + second;
^^^
127?
}
Here is the .java file: http://svn.apache.org/viewvc/hadoop/core/trunk/src/examples/org/apache/hadoop/examples/SecondarySort.java |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||