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

Switch to Threaded View
Pig >> mail # user >> Failed to generate logical plan


Copy link to this message
-
RE: Failed to generate logical plan
Hi Baraa,

I'm assuming you're using trunk for your experiment. Nevertheless, this error basically tells you that Pig cannot instanticate your UDF. Common cause is misspelling. Is mypigudf.DicomParser fully qualified class name of your UDF? I noticed that mypigudf is the jar file name as well.

Thanks,
Xuefu

-----Original Message-----
From: Baraa Mohamad [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 22, 2011 11:41 AM
To: [EMAIL PROTECTED]
Subject: Failed to generate logical plan

Hi all,

I wrote a simple udf DicomParser which read a line and convert it to tuple but when I tried to use like that

register H:/apps/mypig/mypigudf.jar;
A = load 'dicoms/' using org.apache.pig.piggybank.storage.XMLLoader('attr')
as (x:chararray);
B = Foreach A generate mypigudf.DicomParser(x); store B into 'testUdf';
I get this error

Pig Stack Trace
---------------
ERROR 1000: Error during parsing. Failed to generate logical plan. Nested
exception: java.lang.RuntimeException: Cannot instantiate:
mypigudf.DicomParser

org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during parsing. Failed to generate logical plan. Nested exception:
java.lang.RuntimeException: Cannot instantiate: mypigudf.DicomParser
    at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1568)
    at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1513)
    at org.apache.pig.PigServer.registerQuery(PigServer.java:581)
    at
org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:917)
    at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:386)
    at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:176)
    at
org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:152)
    at org.apache.pig.tools.grunt.Grunt.exec(Grunt.java:90)
    at org.apache.pig.Main.run(Main.java:537)
    at org.apache.pig.Main.main(Main.java:108)
===============================================================================
why i can't use it i didn't find how I can solve this error

Regards

Baraa