I am new to Hadoop. I have done word count program with single input file and single output file. Now I want to take 2 files as input and write that output to a single file. I tried like this:
FileInputFormat.setInputPaths(conf, new Path(args[0]), new Path(args[1]));
FileOutputFormat.setOutputPath(conf, new Path(args[2]));
This is the command in terminal:
hadoop jar test.jar Driver /user/in.txt /user/sample.txt /user/out
When I run this, its taking sample.txt as output directory and says that :
Output directory hdfs://localhost:9000/user/sample.txt already exists
Can anyone help me with this?