After I figured out how I can use Python to create Pig UDF functions, I got interested in Jython and wanted to play around with it. So I installed it in my Mac through homebrew by executing the following command.
brew install jython
Everything got installed properly, I was able to run Jython after setting
up the following lines in my
export JYTHON_HOME=$(brew --prefix jython)/libexec
But there was one small annoyance. Every time I was staring Jython, I was getting the following strange warning.
expr: syntax error
After a couple of web searches, I stumbled upon an email thread in the Jython-users mailing list. Basically it was due to a bug in the bash script that is used to start Jython. I opened
/usr/local/Cellar/jython/2.5.3/libexec/bin/jython file and changed the line, which fixed the error.
if expr "$link" : '/' > /dev/null; then to
if expr "$link" : '[/]' > /dev/null; then
I am exploring Jython more and will keep you guys updated, if I find something interesting.