您的位置:首页 > 运维架构 > Apache

Hadoop分布式集群 EclipseException in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputExce

2017-09-23 17:09 1031 查看
最近使用Hadoop分布式集群,今天在Ubuntu上将Eclipse和Hadoop配置好了,然后运行一个去重的案例,我将输入文件传到了hdfs文件系统,但是过程中出现了Exception in thread "main" org.apache.hadoop.mapreduce.lib.input.InvalidInputException: Input path does not exist: 这个错误,显示从项目位置中查找输入文件,结果报错了,解决办法当然就是讲输入输出文件地址好好写了呗,代码如下:

// 设置输入和输出目录

FileInputFormat.addInputPath(job, new Path("hdfs://Master:9000/user/ycl1/input/inputfile1"));

FileOutputFormat.setOutputPath(job, new Path("hdfs://Master:9000/user/ycl1/output"));

重新运行一下,OK了。

这个路径是根据core-site.xml里面的fs.default.name来的。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐