Put build/ivy/lib/Pig/jython-2.5.0.jar in your classpath (if not there,
do ant first). This is a bug we need to fix.
Daniel
Xiaomeng Wan wrote:
Hi,
I want to write a python udf to split string into bags
------------------------------------------------------------
#!/usr/bin/python
import re
@outputSchema("y:bag{t:tuple(word:chararray)}")
def strsplittobag(content,regex):
return re.compile(regex).split(content)
------------------------------------------------------------
it gave an error saying "could not instantiate
'org.apache.pig.scripting.jython.JythonFunction' with arguments
'[/home/.../mypyudfs.py, strsplittobag]'". I had some other python
udfs working, so shouldn't be configuration problem. I am new to
python, did I miss anything?
Thanks!
Shawn