gpt4 book ai didi

java - 相当于 mongo 的输出 :reduce option in hadoop

转载 作者:可可西里 更新时间:2023-11-01 16:34:27 26 4
gpt4 key购买 nike

我正在重写 MongoDB map reduce 作业以改用 Hadoop(使用 mongo-hadoop 连接器),但是当我将两个数据集映射到同一个集合时,它会覆盖值而不是使用它们

{ reduce : "collectionName" } - If documents exists for a given key in the result set and in the old collection, then a reduce operation (using the specified reduce function) will be performed on the two values and the result will be written to the output collection. If a finalize function was provided, this will be run after the reduce as well.

如何使用 mongo-hadoop 完成?

最佳答案

Mongo-Hadoop 目前只支持覆盖目标集合。但是,可以将多个作业链接在一起,从而允许您将 MR 输出发送到一个新作业中,该作业也从旧集合中读取。

关于java - 相当于 mongo 的输出 :reduce option in hadoop,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11399140/

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