mrjob 使用 mongodb 作为数据源
- 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=secondaryAuthenticate 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:hadoopAuthenticate "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 作为数据源的更多相关文章
- Spring Boot中的Mongodb多数据源扩展
在日常工作中,我们通过Spring Data Mongodb来操作Mongodb数据库,在Spring Boot中只需要引入spring-boot-starter-data-mongodb即可. 然后 ...
- solr搜索引擎配置使用mongodb作为数据源
环境说明: 操作系统:由于是使用的docker直接拉取的镜像部署的,系统是LINUX环境 mongodb: 4.0.3 solr: 7.5.0 python: 3.5 配置mongodb 1.拉取mo ...
- spring-boot整合mongodb多数据源的案例
1.运行环境 开发工具:intellij idea JDK版本:1.8 项目管理工具:Maven 4.0.0 2.GITHUB地址 https://github.com/nbfujx/springBo ...
- Spring Boot多数据源配置(二)MongoDB
在Spring Boot多数据源配置(一)durid.mysql.jpa 整合中已经讲过了Spring Boot如何配置mysql多数据源.本篇文章讲一下Spring Boot如何配置mongoDB多 ...
- Mongodb的基本使用及对接多数据源
mongodb介绍 MongoDB(来自于英文单词"Humongous",中文含义为"庞大")是可以应用于各种规模的企业.各个行业以及各类应用程序的开源数据库. ...
- MongoDB的安装与CRUD(JAVA)
http://blogread.cn/it/article/4348?f=wb (MongoDB) 安装: 1)下载MongoDB数据库(这里使用Windows 32 bit版) http://dow ...
- springboot(十一):Spring boot中mongodb的使用
mongodb是最早热门非关系数据库的之一,使用也比较普遍,一般会用做离线数据分析来使用,放到内网的居多.由于很多公司使用了云服务,服务器默认都开放了外网地址,导致前一阵子大批 MongoDB 因配置 ...
- JSON数据从MongoDB迁移到MaxCompute最佳实践
数据及账号准备 首先您需要将数据上传至您的MongoDB数据库.本例中使用阿里云的云数据库 MongoDB 版,网络类型为VPC(需申请公网地址,否则无法与DataWorks默认资源组互通),测试数据 ...
- (转)Spring Boot(十一):Spring Boot 中 MongoDB 的使用
http://www.ityouknow.com/springboot/2017/05/08/spring-boot-mongodb.html MongoDB 是最早热门非关系数据库的之一,使用也比较 ...
随机推荐
- java1.8函数式接口
package com.wzy.t1; @FunctionalInterface//此注解用来声明此接口为函数式接口 public interface People { /** * 1.函数式接口只能 ...
- iOS 2D绘图 (Quartz2D)之Transform(CTM,Translate,Rotate,scale)
前言:Quartz默认采用设备无关的user space来进行绘图,当context(画板)建立之后,默认的坐标系原点以及方向也就确认了,可以通过CTM(current transformation ...
- mysql索引 (校验规则引发的血案)
EXPLAIN SELECT a.* FROM gc_fin_rate_info a LEFT JOIN rbac_user b ON a.owner =b.id; 处理之前的情况. 虽然走了索引, ...
- 物联网平台设计心得:管中窥豹之HeartBeat
前言 在写这篇文章之前,我曾对HeartBeat做过诸多的研究,也做过诸多的项目,在这些项目中,有客户端为了维持状态,而定时向服务端发送的HeartBeat:有服务端为了维持客户端连接状态而处理Hea ...
- LeetCode:Max Points on a Line
题目链接 Given n points on a 2D plane, find the maximum number of points that lie on the same straight l ...
- LeetCode-53-Maximum Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest ...
- go 数据类型转换
使用strconv 包 首先需要import strconv包 //string to int i,err := strconv.Atoi(str) // string to int64 i64,er ...
- 【javascript】箭头函数
ES6标准新增了一种新的函数:Arraw Function(箭头函数). x => x * x 这个函数相当于 function (x){ return x * x; } 题外话:user st ...
- JavaScript数组的方法
push() :将参数加载到数组的最后,返回数组的长度 pop() :删除数组的最后一个元素,返回删除的值 shift() :删除数组的第一个元素,返回删除的值 unshift ...
- 利用HTML5的History API实现无刷新跳转页面初探
HTML4中的History API history这个东西大家应该都不陌生,我们经常使用history.back(-1)来实现后退功能,具体的属性和方法如下: 属性 length 历史的项数.Jav ...