pig-user  

Re: piggybank/register is there a better way?

Ian Holsman
Fri, 10 Oct 2008 19:19:30 -0700

Alan Gates wrote:
register piggybank.jar;
define SearchTermExtractor org.apache.pig.piggybank.evaluation.util.apachelogparser.SearchTermExtractor();
...
searchTerms = FOREACH row GENERATE SearchTermExtractor(url);

Is there a way for the function itself to do the 'define' when it registers itself?

On Oct 10, 2008, at 3:11 AM, Ian Holsman wrote:

So I have been watch (and using) Earl's latest patches with great joy
but I was wondering if there was a less cumbersome way of specifying the functions

for example


searchTerms = FOREACH row GENERATE org.apache.pig.piggybank.evaluation.util.apachelogparser.SearchTermExtractor(url);

vs

searchTerms = FOREACH row GENERATE SearchTermExtractor(url);

is there a way via introspection or something to make it so that we don't need to specify the full class path?

regards
Ian