You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by Devi Kumarappan <kp...@att.net> on 2012/04/23 20:47:51 UTC
Python UDF: import re causes instantiation error
Hi,
I am using cduh3 distributionin the hadoop cluster . My python udf seems to work
fine if it does not import other python modules, but fails with ERROR
org.apache.pig.tools.grunt.Grunt - ERROR 2997: Unable to recreate exception from
backed error: java.io.IOException: Deserialization error: could not instantiate
'org.apache.pig.scripting.jython.JythonFunction' with arguments if I add
"import re" in the UDF.
When I digged around i found that it has been fixed in pig0.10.
https://issues.apache.org/jira/browse/PIG-1824
But, CDUH3 has pig 0.8. Has anyody encountered this problem? Is there a work
around for this in Pig 0.8 or is it possible to update to pig 0.10 in CDUH3?
Thanks, Devi
Re: Python UDF: import re causes instantiation error
Posted by Aniket Mokashi <an...@gmail.com>.
Put the re lib into the jython jar under Lib directory (or all of them), if
CDH has https://issues.apache.org/jira/browse/MAPREDUCE-967, then it should
work.
Also, to debug, import sys and print sys.path in your python script.
Thanks,
Aniket
On Mon, Apr 23, 2012 at 11:47 AM, Devi Kumarappan <kp...@att.net> wrote:
> Hi,
>
> I am using cduh3 distributionin the hadoop cluster . My python udf seems
> to work
> fine if it does not import other python modules, but fails with ERROR
> org.apache.pig.tools.grunt.Grunt - ERROR 2997: Unable to recreate
> exception from
> backed error: java.io.IOException: Deserialization error: could not
> instantiate
> 'org.apache.pig.scripting.jython.JythonFunction' with arguments if I add
> "import re" in the UDF.
>
> When I digged around i found that it has been fixed in pig0.10.
> https://issues.apache.org/jira/browse/PIG-1824
>
> But, CDUH3 has pig 0.8. Has anyody encountered this problem? Is there a
> work
> around for this in Pig 0.8 or is it possible to update to pig 0.10 in
> CDUH3?
>
> Thanks, Devi
--
"...:::Aniket:::... Quetzalco@tl"