|
|
-
Python UDFDanfeng Li 2011-10-06, 22:36
I try to follow the example on http://pig.apache.org/docs/r0.8.1/udf.html#Python+UDFs for Python UDF, but I got the following error
* My command: pig -x local ptest.pig * error message 2011-10-06 15:15:19,995 [main] INFO org.apache.pig.Main - Logging error messages to: /home/dli/pigExamples/PythonUDFs/pig_1317939319904.log 2011-10-06 15:15:20,485 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: file:/// 2011-10-06 15:15:20,956 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 2998: Unhandled internal error. org/python/util/PythonInterpreter Details at logfile: /home/dli/pigExamples/PythonUDFs/pig_1317939319904.log * My pig code Register 'test.py' using jython as myfuncs; a = load 'a.dat' as (v:chararray); b = foreach a generate v, myfuncs.helloworld(); dump b; * test.py @outputSchema("word:chararray") def helloworld(): return 'Hello, World' I wonder what's the problem. My pig version is pig --version Apache Pig version 0.8.0-SNAPSHOT (r1085617) Thanks. Dan |