Error 1121 Importing External Library In Pig Udf In Jython
I'm having a problem using the python library simplejson in jython to write a Pig UDF. I need because jython-standalone-2.5.2.jar doesn't come with a JSON library. I'm using Apache
Solution 1:
I don't know if my answer come too late but I managed to import simplejson in an UDF.
Here is how I did it :
I downloaded simplejson and put it into a lib folder, then in my UDF I did this :
import sys
sys.path.append('/path/to/your/lib/folder')
import simplejson as json
I then managed to do a json.loads() without any problem on my cluster.
Hope it helps
Post a Comment for "Error 1121 Importing External Library In Pig Udf In Jython"