Increasing the max memory to 128 MB (from the default 64 MB) fixes the out of memory problem.
But there is one more issue. TestWordCountGeneric leaves behind the (empty) output directory and the following test TestWordCountSpecific fails to run complaining that the output directory already exists.
I fixed that problem by removing the output directory after completing each of these tests. Since I was at it, I moved the JUnit tests toJUnit4 style from JUnit3 style. All other tests are in JUnit4. Also added a couple of @Override annotations.
There are quite a few warnings because we use mapreduce's JobConf. What is the new way to submit jobs? The documentation says we should use Configuration. I'm not sure how to do that. Can anybody help us with correct usage? Thanks.