Closed r-lomba closed 4 years ago
Hi @r-lomba, the problem seems to be that the from future import print_funciton
statement at the top of the file is not supported. This might be because of the Jython version -- can you try 2.7?
Thanks for the speed-of-light reply, @hadiasghari ! I'll se what I can do about upgrading jython and post my findings. Unfortunately I won't be as quick as you've been, I'll be off at this customer's in a few days. Thanks, until then
I assume this has been since resolved.
I'm writing a log parser using Apache Pig, and I'd like to use Pyasn to extract ASN information from IP addresses.
Normally, to use a Python extension in Apache Pig, you write a Python UDF and then register it in Pig "as jython"
So, this is what I did:
1) I successfully installed pyasn (in a previous try via pip-install, currently I have installed it manually, but still it doesn't work)
2) Wrote a Python UDF as follows:
3) But when I try to register the UDF in Pig, I get the following exception:
I believe this is an incompatibility with Jython, and I've been trying extensively to make it work using a few workarounds and searching the web for possible solutions, but no success.
Any ideas?
Thanks!