You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Brian Adams <Br...@chacha.com> on 2011/07/25 19:27:17 UTC

ERROR 2044

I keep getting an ERROR 2044: The type BYTE cannot be collected as a Key type
I am not totally sure about the fix for this. Any help would be appreciated.

Re: ERROR 2044

Posted by Dmitriy Ryaboy <dv...@gmail.com>.
Can you send along the output of "describe uselect" and "describe filter" ?

Also -- are you sure GenerateRandomId actually returns a long?

And, on an unrelated note, you are aware that you are looking at a potential
bug here, where a failed or lost mapper is rerun and a different random Id
is generated for the same element? More thorough explanation here:
http://blog.rapleaf.com/dev/2009/08/14/using-random-numbers-in-mapreduce-is-dangerous/

D

On Mon, Jul 25, 2011 at 2:31 PM, Brian Adams <Br...@chacha.com> wrote:

> Well, here is part of it:
> getfrstrtdU = FOREACH frstrated GENERATE com.co.pig.GenerateRandomId() as
> randomid:long, GID AS globalid;
> uorder = ORDER getfrstrtdU by randomid;
> uselect = LIMIT uorder $numUsers;
>
> jnr = JOIN uselect BY globalid, flter BY GID PARALLEL 5;
>
> I assume it's happening here on the 'jnr' line because it doesn't like GID,
> which is a chararray.
>
> -----Original Message-----
> From: Alan Gates [mailto:gates@hortonworks.com]
> Sent: Monday, July 25, 2011 5:26 PM
> To: user@pig.apache.org
> Subject: Re: ERROR 2044
>
> Can you share the script you are running that gives this error?
>
> Alan.
>
> On Jul 25, 2011, at 10:27 AM, Brian Adams wrote:
>
> > I keep getting an ERROR 2044: The type BYTE cannot be collected as a
> > Key type I am not totally sure about the fix for this. Any help would be
> appreciated.
>
>
>

RE: ERROR 2044

Posted by Brian Adams <Br...@chacha.com>.
Well, here is part of it:
getfrstrtdU = FOREACH frstrated GENERATE com.co.pig.GenerateRandomId() as randomid:long, GID AS globalid;
uorder = ORDER getfrstrtdU by randomid;
uselect = LIMIT uorder $numUsers;

jnr = JOIN uselect BY globalid, flter BY GID PARALLEL 5;

I assume it's happening here on the 'jnr' line because it doesn't like GID, which is a chararray.

-----Original Message-----
From: Alan Gates [mailto:gates@hortonworks.com] 
Sent: Monday, July 25, 2011 5:26 PM
To: user@pig.apache.org
Subject: Re: ERROR 2044

Can you share the script you are running that gives this error?

Alan.

On Jul 25, 2011, at 10:27 AM, Brian Adams wrote:

> I keep getting an ERROR 2044: The type BYTE cannot be collected as a 
> Key type I am not totally sure about the fix for this. Any help would be appreciated.



Re: ERROR 2044

Posted by Alan Gates <ga...@hortonworks.com>.
Can you share the script you are running that gives this error?

Alan.

On Jul 25, 2011, at 10:27 AM, Brian Adams wrote:

> I keep getting an ERROR 2044: The type BYTE cannot be collected as a Key type
> I am not totally sure about the fix for this. Any help would be appreciated.