adding java re-implementation of mapreduce algorithm