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

标签 java mongodb hadoop mapreduce

我正在重写 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/

相关文章:

java - 如何在 javaFX 2.0 应用程序中包装 swing 组件

node.js - 如何创建带有字典列表的 Mongoose 模型?

python - 如何在 Python 中创建一组在 Mongodb 中唯一的字段组合

hadoop - 更改配置单元 i​​node 目录

hadoop - 在插入另一个表之前转换配置单元表中的数据

java - "Reverse Order"中二叉树逐行层序遍历,时间复杂度O(n)

java - 如何优化这个更新 SQL 查询

Java比较器多字段排序不起作用

javascript - 如何从 Mongoose 的对象中查询数据?

hadoop - 我可以使用 hadoop 来训练神经网络吗?