Structured input, output, and writable classes for map-reduce