In a simple MapReduce program, there is one input file, that after splitting each line, it will be mapped. But now I want to read each line and after split, the line, map it two times by different keys. reading one line and two maps (two times using context.write). I read: Running two mapper and two reducer for simple hadoop mapreduce jobs That answered: So just put 2 files into your input directories so that you can get 2 mappers running. Now I should to put two same files?
MultipleInputs(available only withmapred) to pass your files to two different mappers. Haven't tried it so can't tell for sure. - philantrovert