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

来源:互联网 发布:python sock.recv 编辑:程序博客网 时间:2024/06/06 10:40

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

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

 FileInputFormat.setInputDirRecursive(job, true);
 FileInputFormat.addInputPath(job, new Path(input));
阅读全文
0 0