MapReduce中如果想要处理HDFS中的文件,做法是:
FileInputFormat.setInputPaths(job, new Path("/hdfs/iie4bu/fileDir/input"));
FileOutputFormat.setOutputPath(job, new Path("/hdfs/iie4bu/fileDir/output"));
如果要处理本地文件,做法是:
FileInputFormat.setInputPaths(job, new Path("file:/home/iie4bu/input"));
FileOutputFormat.setOutputPath(job, new Path("file:/home/iie4bu/output"));