Java implementation to use with Map-Reduce