Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig, mail # user - ERROR 1070: Could not resolve org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth using imports:


Copy link to this message
-
Re: ERROR 1070: Could not resolve org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth using imports:
Russell Jurney 2012-09-30, 06:21
You have the wrong package name for isotomonth. It is in truncate, not convert.

Russell Jurney http://datasyndrome.com

On Sep 29, 2012, at 10:31 PM, yogesh dhari <[EMAIL PROTECTED]> wrote:

>
> grunt> register /opt/pig-0.10.0/contrib/piggybank/java/piggybank.jar
> grunt> register /opt/pig-0.10.0/build/ivy/lib/Pig/joda-time-1.6.jar
>
> and also defined
>
> grunt> define CustomFormatToISO  org.apache.pig.piggybank.evaluation.datetime.convert.CustomFormatToISO()  ;
> grunt> define ISOToMonth  org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth();
>
> Now I performed the query on NYSE_B.
>
> grunt> describe NYSE_B;
>
> NYSE_B: {exchange: chararray,symbol: chararray,date: chararray,divi: float}
>
> ans = foreach (group NYSE_B by ISOToMonth(date)) generate group as monthh, MAX(NYSE_A.divi) as max_rt;
>
> got the ERROR
>
> 2012-09-30 10:25:15,821 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1070: Could not resolve org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth using imports:
> [, org.apache.pig.builtin., org.apache.pig.impl.builtin.]
> 2012-09-30 10:25:15,822 [main] WARN  org.apache.pig.tools.grunt.Grunt - There is no log file to write to.
> 2012-09-30 10:25:15,822 [main] ERROR org.apache.pig.tools.grunt.Grunt - Failed to parse: Pig script failed to parse:
> <line 12, column 31> Failed to generate logical plan. Nested exception: java.lang.RuntimeException:
> Cannot instantiate: org.apache.pig.piggybank.evaluation.datetime.convert.ISOToMonth
>    at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:182)
>    at org.apache.pig.PigServer$Graph.validateQuery(PigServer.java:1565)
>    at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1538)
>
> Please help & suggest
>
> Thanks & Regards
> Yogesh Kumar Dhari
>