rab*_*ens 4 recursion hadoop hdfs
我的文件结构如下:
/indir/somedir1/somefile
/indir/somedir1/someotherfile...
/indir/somedir2/somefile
/indir/somedir2/someotherfile...
Run Code Online (Sandbox Code Playgroud)
我现在想要递归地将所有内容传递给MR作业,我正在使用新的API.所以我做了:
FileInputFormat.setInputPaths(job, new Path("/indir"));
Run Code Online (Sandbox Code Playgroud)
但是这项工作失败了:
Error: java.io.FileNotFoundException: Path is not a file: /indir/somedir1
Run Code Online (Sandbox Code Playgroud)
我正在使用Hadoop 2.4,在这篇文章中声明Hadoop 2的新API不支持递归文件.但我想知道这是怎么回事,因为我认为在Hadoop工作中抛出一个大的嵌套目录结构是世界上最普通的事情......
那么,这是故意的,还是这个错误?在这两种方式中,除了使用旧API之外还有其他解决方法吗?