Search

Can we process different input file directories with different input formats, like some text files and some sequence files in a single MR job?



Yes, we can implement this by MultipleInputs.addInputPath() methods in job driver class. might set up the input as follows:

MultipleInputs.addInputPath(job, inputPath1, TextInputFormat.class, Mapper1.class)
MultipleInputs.addInputPath(job,inputPath2,SequeneFileInputFormat.class, Mapper2.class); 


Here Mapper1 class handles TextInputFormat data and Mapper2 class handles SequenceFileInputFormat data.