Hi Kun,
The book's code is for 0.20.0. In Hadoop 0.17.x WritableComparable was
not generic, so you need a declaration like:
public class IntPair implements WritableComparable {
}
And the compareTo() method should look like this:
public int compareTo(Object o) {
IntPair ip = (IntPair) o;
Hello everyone,
I am writing my own Comparator inherits from WritableComparable.
I got the folliowing code from "Hadoop definitive guide", which is not working
at all, it reminds me "WritableComparable does not take parameter". The book
might be using Hadoop-0.21
I also tried the old method