hadoop 报错Error: java.io.FileNotFoundException: Path is not a file:/xx1/xx2的解决办法

来源:互联网 发布:centos 挂载硬盘到www 编辑:程序博客网 时间:2024/05/16 18:50

主要原因就是hadoop1.x的FileInputFormat.setInputPaths(job, new Path(input));

在hadoop2.x的环境运行导致的,将上述代码用下面两行代码替换即可:

 FileInputFormat.setInputDirRecursive(job, true);
 FileInputFormat.addInputPath(job, new Path(input));
阅读全文
0 0
原创粉丝点击