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 ( 0.22.0 )将内容写到不同的文件中,例如 part-r-00000 part-r-00001 part-r-00002 part-r-00003 每个 reduce-job 一个不同的文件。我知道我可以使用 MultipleOutputs-Class,但这让我只能更改“部分”短语,但这不是我想要的。我希望能够说出哪个减速器使用哪个输出文件以及它最后得到的数字。
当然你有控制权。作业完成时(例如,在 job.waitForCompletion(true) 之后)。您知道输出路径和使用的减速器数量。只需重命名文件,就是这样......要运行更多的reducer,您应该使用一个分区器类。