Re: Implementing compareTo in user-written keys where one extends the other is error prone

2009-05-04 Thread Shevek
On Sun, 2009-05-03 at 23:38 -0700, Sharad Agarwal wrote: > Marshall Schor wrote: > > > > public class Super implements WritableComparable { > > . . . > > public int compareTo(Super o) { > > // sort on string value > > . . . > > } > > > > I implemented the 2nd key class (let's call it S

Re: Implementing compareTo in user-written keys where one extends the other is error prone

2009-05-03 Thread Sharad Agarwal
Marshall Schor wrote: > > public class Super implements WritableComparable { > . . . > public int compareTo(Super o) { > // sort on string value > . . . > } > > I implemented the 2nd key class (let's call it Sub) > > public class Sub extends Super { > . . . > public int compareTo(S

Re: Implementing compareTo in user-written keys where one extends the other is error prone

2009-05-01 Thread Marshall Schor
thanks for the tip. I'll look into it - it doesn't look too hard in my case to do. -Marshall Owen O'Malley wrote: > If you use custom key types, you really should be defining a > RawComparator. It will perform much much better. > > -- Owen > >

Re: Implementing compareTo in user-written keys where one extends the other is error prone

2009-04-30 Thread Owen O'Malley
If you use custom key types, you really should be defining a RawComparator. It will perform much much better. -- Owen

Implementing compareTo in user-written keys where one extends the other is error prone

2009-04-30 Thread Marshall Schor
Hi. I had difficulties in getting Reduce sorting to wor - it took me a good art of a day to figure out what was going wrong, so I'm sharing this in hopes of earning something from the community or getting hadoop improved to avoid thisind of error for future users. I have 2 key classes, one holds