You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Jonathan Coveney <jc...@gmail.com> on 2011/02/28 17:24:18 UTC

Odd error -- thinks UDF is referring to a group...

I have a jar with UDFS called squeal.jar...I know it works, because I can
access methods in the jar. However, when I try this:

register /home/jcoveney/udfs/squeal/jar/squeal.jar;
A = LOAD 'test.txt' AS (uid:chararray, ss2k:int, t1:chararray, t2:chararray,
t3:chararray);
B = GROUP A BY uid;
C = FOREACH B {
ord = ORDER A BY ss2k ASC;
GENERATE group, FLATTEN(squeal.sessionize((ord.ss2k, ord.t1, ord.t2,
ord.t3),1));
}
DUMP C;

I get this error:

2011-02-28 11:13:26,430 [main] ERROR org.apache.pig.tools.grunt.Grunt -
ERROR 1000: Error during parsing. Invalid alias: squeal in {group:
chararray,A: {uid: chararray,ss2k: int,t1: chararray,t2: chararray,t3:
chararray}}

I'm very confused as to why this is the case....I've used this UDF
successfully in the past. Any clue how to fix this? I appreciate the help.

I am using the most recent trunk.

Re: Odd error -- thinks UDF is referring to a group...

Posted by Dmitriy Ryaboy <dv...@gmail.com>.
What is the complete class name of sessionize?

D

On Mon, Feb 28, 2011 at 8:24 AM, Jonathan Coveney <jc...@gmail.com> wrote:
> I have a jar with UDFS called squeal.jar...I know it works, because I can
> access methods in the jar. However, when I try this:
>
> register /home/jcoveney/udfs/squeal/jar/squeal.jar;
> A = LOAD 'test.txt' AS (uid:chararray, ss2k:int, t1:chararray, t2:chararray,
> t3:chararray);
> B = GROUP A BY uid;
> C = FOREACH B {
> ord = ORDER A BY ss2k ASC;
> GENERATE group, FLATTEN(squeal.sessionize((ord.ss2k, ord.t1, ord.t2,
> ord.t3),1));
> }
> DUMP C;
>
> I get this error:
>
> 2011-02-28 11:13:26,430 [main] ERROR org.apache.pig.tools.grunt.Grunt -
> ERROR 1000: Error during parsing. Invalid alias: squeal in {group:
> chararray,A: {uid: chararray,ss2k: int,t1: chararray,t2: chararray,t3:
> chararray}}
>
> I'm very confused as to why this is the case....I've used this UDF
> successfully in the past. Any clue how to fix this? I appreciate the help.
>
> I am using the most recent trunk.
>