• When using a mongoDB collection as input, add the arguments -jobconf mongo.input.uri=<input mongo URI> and -inputformat com.mongodb.hadoop.mapred.MongoInputFormat
  • When using a mongoDB collection as output, add the arguments -jobconf mongo.output.uri=<input mongo URI> and -outputformat com.mongodb.hadoop.mapred.MongoOutputFormat

Examples:

  • mongodb://joe:12345@weyland-yutani:27017/analytics.users?readPreference=secondary Authenticate as "joe" with the password "12345" and read from only SECONDARY nodes from the "users" collection in the database "analytics".
  • mongodb://joe:12345@weyland-yutani:27017/production.customers?readPreferenceTags=dc:tokyo,type:hadoop Authenticate "joe" with the password "12345" and read the "users" collection in database "analytics" only on nodes tagged with "dc:tokyo" and "type:hadoop".

参考:

https://github.com/mongodb/mongo-hadoop/wiki/Streaming-Usage

https://github.com/mongodb/mongo-hadoop/wiki/Configuration-Reference

https://docs.mongodb.org/manual/reference/connection-string/

mrjob 使用 mongodb 作为数据源的更多相关文章

  1. Spring Boot中的Mongodb多数据源扩展

    在日常工作中,我们通过Spring Data Mongodb来操作Mongodb数据库,在Spring Boot中只需要引入spring-boot-starter-data-mongodb即可. 然后 ...

  2. solr搜索引擎配置使用mongodb作为数据源

    环境说明: 操作系统:由于是使用的docker直接拉取的镜像部署的,系统是LINUX环境 mongodb: 4.0.3 solr: 7.5.0 python: 3.5 配置mongodb 1.拉取mo ...

  3. spring-boot整合mongodb多数据源的案例

    1.运行环境 开发工具:intellij idea JDK版本:1.8 项目管理工具:Maven 4.0.0 2.GITHUB地址 https://github.com/nbfujx/springBo ...

  4. Spring Boot多数据源配置(二)MongoDB

    在Spring Boot多数据源配置(一)durid.mysql.jpa 整合中已经讲过了Spring Boot如何配置mysql多数据源.本篇文章讲一下Spring Boot如何配置mongoDB多 ...

  5. Mongodb的基本使用及对接多数据源

    mongodb介绍 MongoDB(来自于英文单词"Humongous",中文含义为"庞大")是可以应用于各种规模的企业.各个行业以及各类应用程序的开源数据库. ...

  6. MongoDB的安装与CRUD(JAVA)

    http://blogread.cn/it/article/4348?f=wb (MongoDB) 安装: 1)下载MongoDB数据库(这里使用Windows 32 bit版) http://dow ...

  7. springboot(十一):Spring boot中mongodb的使用

    mongodb是最早热门非关系数据库的之一,使用也比较普遍,一般会用做离线数据分析来使用,放到内网的居多.由于很多公司使用了云服务,服务器默认都开放了外网地址,导致前一阵子大批 MongoDB 因配置 ...

  8. JSON数据从MongoDB迁移到MaxCompute最佳实践

    数据及账号准备 首先您需要将数据上传至您的MongoDB数据库.本例中使用阿里云的云数据库 MongoDB 版,网络类型为VPC(需申请公网地址,否则无法与DataWorks默认资源组互通),测试数据 ...

  9. (转)Spring Boot(十一):Spring Boot 中 MongoDB 的使用

    http://www.ityouknow.com/springboot/2017/05/08/spring-boot-mongodb.html MongoDB 是最早热门非关系数据库的之一,使用也比较 ...

随机推荐

  1. [No000072]Windows环境变量列表

    环境变量是目录的可以直接在绝对路径中引用,所有值均可在CMD下用 echo 命令显示以查看. 最常用的有—— %APPDATA% %HOMEPATH% %ProgramFiles% %SYSTEMRO ...

  2. 选中多个<ul>中的第一个<li>方法

    获取第一个ul中的第一个li标签的方法: //获取第一个ul中的第一个li /* $("ul li:first").css("background"," ...

  3. Windows 2008 IIS7.5中创建独立账号的FTP站点图文教程

    Windows 2008上的IIS7.5,FTP功能已经非常强大了,完全不下于Serv-U这样的第三方软件.本文小编就介绍在IIS7.5上配置独立账号的FTP站点. 1.创建Windows账号 右击点 ...

  4. C#基础系列——再也不用担心面试官问我“事件”了

    前言:作为.Net攻城狮,你面试过程中是否遇到过这样的问题呢:什么是事件?事件和委托的区别?既然事件作为一种特殊的委托,那么它的优势如何体现?诸如此类...你是否也曾经被问到过?你又是否都答出来了呢? ...

  5. 在VS中用正则表达式查找或替换

    2005VS和2008VS正则替换规则如下(2013VS不适合,不需要的同学可以直接跳到2013VS的操作办法): Example: 查找#incldue中带有gl开头的头文件的,用include.+ ...

  6. Ubuntu 14.04 掛載 網路磁碟 mount internet disk

    1.install cifs tool (Common Internet File System) 新增 /etc/apt/apt.conf.d/01proxy 檔案並加入以下字串,即可透過此台機器做 ...

  7. 图片加载框架Fresco与V4包冲突解决方法

  8. SpringBean_获取Spring加载的所有bean(实践)

      一.查询代码 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 3 ...

  9. c++/java/python priority_que实现最大堆和最小堆

    #include<iostream>#include<vector>#include<math.h>#include<string>#include&l ...

  10. java类的初始化块/执行顺序,实例化对象数据赋值

    java里初始化一个类的对象,通过初始化快或者构造方法进行数据赋值.与其相关的执行代码有这么几种: 静态初始化块 初始化块 构造方法 静态初始化块 静态初始化块只在类加载时执行一次,同时静态初始化块只 ...