Toy MapReduce written in Java