On Tue, 19 Jul 2011 17:02:32 -0700, Choonho Son <choonho....@gmail.com> wrote: > is it possible job.setOutputKeyClass(MapWritable.class);
As others have said, MapWritable doesn't implement Comparable, so it can't be used as a key. The ArrayWritable of Texts is one idea, but I'd suggest instead implementing your OWN WritableComparable class MyKey, which would contain the four strings as member fields. Just make a Plain Old Java Object, implement Writable by telling it how to write and read the fields one at a time (and in the same order!), and implement comparable as usual for POJOs (remember to override .equals() and .hashCode() too!). This way you get type-safety as well, and you know exactly what your keys will look like.