Hi Tarandeep,

MapWritable doesn't implement Comparable, so I think it cannot be used as a
key. If u want that functionality, then u have to have a subclass that
implements Comparable and there u will define your sorting logic.

Tamer

On Thu, May 29, 2008 at 12:51 PM, Tarandeep Singh <[EMAIL PROTECTED]>
wrote:

> Hi,
>
> I want to use MapWritable or SortedMapWritable as intermediate key emitted
> by Map functions. I want to know how the framework is going to sort and
> group such keys. Also how can I provide my own comparator so that the
> framework sorts and groups according to my requirement.
>
> thanks a lot,
> Taran
>
> On Wed, May 28, 2008 at 4:39 PM, Tarandeep Singh <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> >
> > Can someone point me to an example code where
> MapWritable/SortedMapWritable
> > is used as in intermediate key. I am looking for how to set the
> comparator
> > for MapWritable/SortedMapwritable so that the framework groups/sorts the
> > intermediate keys in accordance to my requirement - sort the intermediate
> > Keys (MapWritable objects) based on concatenated value of values in the
> > MapWritable object.
> >
> > Thanks,
> > Taran
> >
>



-- 
Proud to be a follower of the "Best of Mankind"
"وَاذْكُرْ رَبَّكَ إِذَا نَسِيتَ وَقُلْ عَسَى أَنْ يَهْدِيَنِي رَبِّي
لأقْرَبَ مِنْ هَذَا رَشَدًا"

Reply via email to