Typically, in a map reduce job, you generate one output file for a job. However,if you want to output to multiple files, then, you would use MultipleOutputs in your mapper.
Here are the four things you need to do :
Declare MultipleOutputs (mos) variable
Override setup and instantiate mos
Override cleanup and close mos
In the map method, mos.write.
No comments:
Post a Comment