Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我仍然无法弄清楚如何在 hadoop 中获取输入路径的总数。我在 Hadoop Mapper 中看到了 Get Total Input Path Count,但不明白。我只是想知道,输入路径中有多少个文件......有什么帮助吗?
就像我在引用问题的答案末尾所说的那样,如果您使用的是 hadoop v0.20.203+,那么您可以查询配置属性mapreduce.input.num.files
mapreduce.input.num.files
long inputFiles = context.getConfiguration().getLong('mapreduce.input.num.files');