gpt4 book ai didi

hadoop - Hadoop OutputCollector重复键

转载 作者:行者123 更新时间:2023-12-02 21:42:31 24 4
gpt4 key购买 nike

处理完文字后我有一对。 K-是Text和自定义V类。 K是一个单词,因此可以重复。但是使用Map功能后,具有相同键的最新对将替换为最后一个。例如
(买,(1,2))(捕获,(2,1))(买,(3,3))
在减少功能中我收到
(买,(3,3))(买,(3,3))

(捕获,(2,1))

那么,如何使用相同的键将Map函数值收集到OutputCollector?

最佳答案

也许你的问题是

the iterator in the Hadoop reducer uses a single object whose contents it changes each time it goes to the next value.



检查此 article以获取更多信息。

关于hadoop - Hadoop OutputCollector重复键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27653463/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com