异常:
Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: file:/wordcount/data.txt
问题:找不到此文件,文件路径不对!
Path inPath=new Path("/wordcount/data.txt");Path outPath=new Path("/mroutput/wordcount");
解决:修改文件路径:指定完整的路径
Path inPath=new Path("hdfs://hadoop101:9000/wordcount/data.txt");Path outPath=new Path("hdfs://hadoop101:9000/mroutput/wordcount");
再次执行效果: