You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Harsh J <ha...@cloudera.com> on 2012/01/17 19:42:33 UTC

Re: Sort databag

Hi Marek,

Moving question to user@pig.apache.org which may be more relevant.

(BCC'd mapreduce-user@, CC'd you)

On 17-Jan-2012, at 9:57 PM, Marek Miglinski wrote:

> Hi,
> 
> I receive a DataBag in my custom UDF and want to sort it by first field in Tuples it stores. The way I implemented is: I create List of Tuples and add all Tuples from DataBag to List and then use custom Collections.sort But that way I loose a lot of resources and memory does anybody knows a different way?
> 
> 
> Thanks,
> Marek M.

--
Harsh J
Customer Ops. Engineer, Cloudera


Re: Sort databag

Posted by Jonathan Coveney <jc...@gmail.com>.
Is there any reason you can't use pig's order by?

2012/1/17 Harsh J <ha...@cloudera.com>

> Hi Marek,
>
> Moving question to user@pig.apache.org which may be more relevant.
>
> (BCC'd mapreduce-user@, CC'd you)
>
> On 17-Jan-2012, at 9:57 PM, Marek Miglinski wrote:
>
> Hi,
>
> I receive a DataBag in my custom UDF and want to sort it by first field in
> Tuples it stores. The way I implemented is: I create List of Tuples and add
> all Tuples from DataBag to List and then use custom Collections.sort But
> that way I loose a lot of resources and memory does anybody knows a
> different way?
>
>
> Thanks,
> Marek M.
>
>
> --
> Harsh J
> Customer Ops. Engineer, Cloudera
>
>