use ngenerate for mapreducedim