use the common code-gen for mapreduce