You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by kumar palaniappan <kp...@att.net> on 2012/04/19 22:30:12 UTC
Pig not able to instantiate Python UDF
Hi,
I have set the PIG_CALSSPATH and CLASS_PATH pointing to the location of jython
jar file and my python program is in the same location as my pig script.
But I am encountering the following error.
Pig Stack Trace
---------------
ERROR 1000: Error during parsing. could not instantiate
'org.apache.pig.scripting.jython.JythonFunction' with arguments
'[/home/devi/customer.py, cname]'
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error during
parsing. could not instantiate 'org.apache.pig.scripting.jython.JythonFunction'
with arguments '[/home/devi/customer.py, cname]'
at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1618)
at org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1562)
at org.apache.pig.PigServer.registerQuery(PigServer.java:534)
at
org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:871)
at
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:388)
Any help would be appreciated.
Thanks, Devi
Re: Pig not able to instantiate Python UDF
Posted by Devi Kumarappan <kp...@att.net>.
I had the CLASSPATH set right.But the problem happen to be the jython version.
When I installed jython 2.5.0, the problem got resolved.
________________________________
From: Rajgopal Vaithiyanathan <ra...@gmail.com>
To: user@pig.apache.org
Sent: Fri, April 20, 2012 12:11:38 AM
Subject: Re: Pig not able to instantiate Python UDF
correct the spelling of PIG_CALSSPATH to PIG_CLASSPATH
and its not CLASS_PATH .. just CLASSPATH
did you export them? like..
$ CLASSPATH=/path/to/jar_file1.jar:/path/to/jar_file2.jar:/path/to/jar_file3
.jar
$ PIG_CLASSPATH=
/path/to/jar_file1.jar:/path/to/jar_file2.jar:/path/to/jar_file3.jar
$
$ export CLASSPATH
$ export PIG_CLASSPATH
Raj :)
On Fri, Apr 20, 2012 at 2:00 AM, kumar palaniappan <kp...@att.net> wrote:
> Hi,
>
> I have set the PIG_CALSSPATH and CLASS_PATH pointing to the location of
> jython
> jar file and my python program is in the same location as my pig script.
>
> But I am encountering the following error.
> Pig Stack Trace
> ---------------
> ERROR 1000: Error during parsing. could not instantiate
> 'org.apache.pig.scripting.jython.JythonFunction' with arguments
> '[/home/devi/customer.py, cname]'
> org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error
> during
> parsing. could not instantiate
> 'org.apache.pig.scripting.jython.JythonFunction'
> with arguments '[/home/devi/customer.py, cname]'
> at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1618)
> at
> org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1562)
> at org.apache.pig.PigServer.registerQuery(PigServer.java:534)
> at
> org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:871)
> at
>
>org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:388)
>)
>
>
> Any help would be appreciated.
>
> Thanks, Devi
>
--
Thanks and Regards,
Rajgopal Vaithiyanathan.
Re: Pig not able to instantiate Python UDF
Posted by Rajgopal Vaithiyanathan <ra...@gmail.com>.
correct the spelling of PIG_CALSSPATH to PIG_CLASSPATH
and its not CLASS_PATH .. just CLASSPATH
did you export them? like..
$ CLASSPATH=/path/to/jar_file1.jar:/path/to/jar_file2.jar:/path/to/jar_file3
.jar
$ PIG_CLASSPATH=
/path/to/jar_file1.jar:/path/to/jar_file2.jar:/path/to/jar_file3.jar
$
$ export CLASSPATH
$ export PIG_CLASSPATH
Raj :)
On Fri, Apr 20, 2012 at 2:00 AM, kumar palaniappan <kp...@att.net> wrote:
> Hi,
>
> I have set the PIG_CALSSPATH and CLASS_PATH pointing to the location of
> jython
> jar file and my python program is in the same location as my pig script.
>
> But I am encountering the following error.
> Pig Stack Trace
> ---------------
> ERROR 1000: Error during parsing. could not instantiate
> 'org.apache.pig.scripting.jython.JythonFunction' with arguments
> '[/home/devi/customer.py, cname]'
> org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1000: Error
> during
> parsing. could not instantiate
> 'org.apache.pig.scripting.jython.JythonFunction'
> with arguments '[/home/devi/customer.py, cname]'
> at org.apache.pig.PigServer$Graph.parseQuery(PigServer.java:1618)
> at
> org.apache.pig.PigServer$Graph.registerQuery(PigServer.java:1562)
> at org.apache.pig.PigServer.registerQuery(PigServer.java:534)
> at
> org.apache.pig.tools.grunt.GruntParser.processPig(GruntParser.java:871)
> at
>
> org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:388)
>
>
> Any help would be appreciated.
>
> Thanks, Devi
>
--
Thanks and Regards,
Rajgopal Vaithiyanathan.