Follow the below steps for passsing multiple input files from different direcories.Just driver code changes.Follow the below driver code.
CODE:
public int run(String[] args) throws Exception {
Configuration conf=new Configuration();
Job job=Job.getInstance(conf, "MultipleDirectoryAsInput");
job.setMapperClass(Map1Class.class);
job.setMapperClass(Map2Class.class);
job.setReducerClass(ReducerClass.class);
job.setJarByClass(DriverClass.class);
job.setMapOutputKeyClass(Text.class);
job.setMapOutputValueClass(IntWritable.class);
job.setOutputKeyClass(Text.class);
job.setOutputValueClass(NullWritable.class);
//FileInputFormat.setInputPaths(job, new Path(args[0]));
MultipleInputs.addInputPath(job, new Path(args[0]),TextInputFormat.class,Map1Class.class);
MultipleInputs.addInputPath(job, new Path(args[1]), TextInputFormat.class, Map2Class.class);
FileOutputFormat.setOutputPath(job, new Path(args[2]));
return job.waitForCompletion(true)?0:1;
}