You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Jeremy Chow <co...@gmail.com> on 2008/09/25 04:22:58 UTC

Can hadoop sort by values rather than keys?

Hi list,
  The default way hadoop doing its sorting is by keys , can it sort by
values rather than keys?

Regards,
Jeremy
-- 
My research interests are distributed systems, parallel computing and
bytecode based virtual machine.

http://coderplay.javaeye.com

Re: Can hadoop sort by values rather than keys?

Posted by Jim Twensky <ji...@gmail.com>.
Sorting according to keys is a requirement for the map/reduce algorithm. I'd
suggest running a second map/reduce phase on the output files of your
application and use the values as keys in that second phase. I know that
will increase the running time, but this is how I do it when I need to get
my output files sorted according to their values rather then keys.

Jim

On Wed, Sep 24, 2008 at 9:28 PM, Qin Gao <qi...@cs.cmu.edu> wrote:

> Why not use the value as keys.
>
> On Wed, Sep 24, 2008 at 10:22 PM, Jeremy Chow <co...@gmail.com> wrote:
>
> > Hi list,
> >  The default way hadoop doing its sorting is by keys , can it sort by
> > values rather than keys?
> >
> > Regards,
> > Jeremy
> > --
> > My research interests are distributed systems, parallel computing and
> > bytecode based virtual machine.
> >
> > http://coderplay.javaeye.com
> >
>

Re: Can hadoop sort by values rather than keys?

Posted by Qin Gao <qi...@cs.cmu.edu>.
Why not use the value as keys.

On Wed, Sep 24, 2008 at 10:22 PM, Jeremy Chow <co...@gmail.com> wrote:

> Hi list,
>  The default way hadoop doing its sorting is by keys , can it sort by
> values rather than keys?
>
> Regards,
> Jeremy
> --
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> http://coderplay.javaeye.com
>

Re: Can hadoop sort by values rather than keys?

Posted by Billy Pearson <sa...@pearsonwholesale.com>.
Might be able to use InverseMapper.class

To help flip the key/value to value/key

Billy


"Jeremy Chow" <co...@gmail.com> wrote in 
message news:bcaf338a0809241922n5e1f3321t4deb0eb36c89c26a@mail.gmail.com...
> Hi list,
>  The default way hadoop doing its sorting is by keys , can it sort by
> values rather than keys?
>
> Regards,
> Jeremy
> -- 
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> http://coderplay.javaeye.com
>