I had a hard time getting the Jython WordCount.py example to work.
The first problem was caused by changes to Java:
cd ~/Desktop/hadoop-0.9.2/src/examples/python
bash compile
1 ./jpywork/org/apache/hadoop/examples/getopt.java:268: as of release 1.4,
'assert' is a keyword, and may not be used as an identifier
(try -source 1.3 or lower to use 'assert' as an identifier)
if (frame.getglobal("__debug__").__nonzero__())
Py.assert(frame.getglobal("len").__call__(frame.getlocal(2))._eq(i$9));
To work around the problem, I updated the compile file. I added
'--compileropts "-source 1.3"' to the jythonc call. Perhaps the
underlying problem is Jython-specific, but at least there's a
workaround for us.
The next problem is specific to Ubuntu 6.10. jythonc requires Python
2.1 which is no longer easily obtainable. The .deb that fixes this is
still in testing. You can get it from here in the meantime:
http://debian.lcs.mit.edu/debian/pool/main/j/jython/jython_2.1.0-23_all.deb
This .deb lets any version of cPython work.
Happy Hacking!
-jj
--
http://jjinux.blogspot.com/