MongoDB Connector for Hadoop
MongoDB Connector for Hadoop
https://github.com/mongodb/mongo-hadoop
Purpose
The MongoDB Connector for Hadoop is a library which allows MongoDB (or backup files in its data format, BSON) to be used as an input source, or output destination, for Hadoop MapReduce tasks. It is designed to allow greater flexibility and performance and make it easy to integrate data in MongoDB with other parts of the Hadoop ecosystem.
Current stable release: 1.2.0
Features
- Can create data splits to read from standalone, replica set, or sharded configurations
- Source data can be filtered with queries using the MongoDB query language
- Supports Hadoop Streaming, to allow job code to be written in any language (python, ruby, nodejs currently supported)
- Can read data from MongoDB backup files residing on S3, HDFS, or local filesystems
- Can write data out in .bson format, which can then be imported to any MongoDB database with
mongorestore - Works with BSON/MongoDB documents in other Hadoop tools such as Pig and Hive.
Download
See the release page.
Building
To build, first edit the value for hadoopRelease in ThisBuild in the build.sbt file to select the distribution of Hadoop that you want to build against. For example to build for CDH4:
hadoopRelease in ThisBuild := "cdh4"
or for Hadoop 1.0.x:
hadoopRelease in ThisBuild := "1.0"
To determine which value you need to set in this file, refer to the list of distributions below. Then run ./sbt package to build the jars, which will be generated in the core/target/ directory.
After successfully building, you must copy the jars to the lib directory on each node in your hadoop cluster. This is usually one of the following locations, depending on which Hadoop release you are using:
$HADOOP_HOME/lib/$HADOOP_HOME/share/hadoop/mapreduce/$HADOOP_HOME/share/hadoop/lib/
Supported Distributions of Hadoop
Apache Hadoop 1.0
Does not support Hadoop Streaming.
Build using
"1.0"or"1.0.x"Apache Hadoop 1.1
Includes support for Hadoop Streaming.
Build using
"1.1"or"1.1.x"Apache Hadoop 0.20.*
Does not support Hadoop Streaming
Includes Pig 0.9.2.
Build using
"0.20"or"0.20.x"Apache Hadoop 0.23
Includes Pig 0.9.2.
Includes support for Streaming
Build using
"0.23"or"0.23.x"Cloudera Distribution for Hadoop Release 4
This is the newest release from Cloudera which is based on Apache Hadoop 2.0. The newer MR2/YARN APIs are not yet supported, but MR1 is still fully compatible.
Includes support for Streaming and Pig 0.11.1.
Build with
"cdh4"Apache Hadoop 2.2
Includes Pig 0.9.2
Includes support for Streaming
Build using
"2.2"or"2.2.x"
Configuration
Streaming
Examples
Usage with static .bson (mongo backup) files
Usage with Amazon Elastic MapReduce
Amazon Elastic MapReduce is a managed Hadoop framework that allows you to submit jobs to a cluster of customizable size and configuration, without needing to deal with provisioning nodes and installing software.
Using EMR with the MongoDB Connector for Hadoop allows you to run MapReduce jobs against MongoDB backup files stored in S3.
Submitting jobs using the MongoDB Connector for Hadoop to EMR simply requires that the bootstrap actions fetch the dependencies (mongoDB java driver, mongo-hadoop-core libs, etc.) and place them into the hadoop distributions lib folders.
For a full example (running the enron example on Elastic MapReduce) please see here.
Usage with Pig
Documentation on Pig with the MongoDB Connector for Hadoop.
For examples on using Pig with the MongoDB Connector for Hadoop, also refer to the examples section.
Notes for Contributors
If your code introduces new features, please add tests that cover them if possible and make sure that the existing test suite still passes. If you're not sure how to write a test for a feature or have trouble with a test failure, please post on the google-groups with details and we will try to help.
Maintainers
Mike O'Brien (mikeo@10gen.com)
Contributors
- Brendan McAdams brendan@10gen.com
- Eliot Horowitz erh@10gen.com
- Ryan Nitz ryan@10gen.com
- Russell Jurney (@rjurney) (Lots of significant Pig improvements)
- Sarthak Dudhara sarthak.83@gmail.com (BSONWritable comparable interface)
- Priya Manda priyakanth024@gmail.com (Test Harness Code)
- Rushin Shah rushin10@gmail.com (Test Harness Code)
- Joseph Shraibman jks@iname.com (Sharded Input Splits)
- Sumin Xia xiasumin1984@gmail.com (Sharded Input Splits)
- Jeremy Karn
- bpfoster
- Ross Lawley
- Carsten Hufe
- Asya Kamsky
- Thomas Millar
Support
Issue tracking: https://jira.mongodb.org/browse/HADOOP/
Discussion: http://groups.google.com/group/mongodb-user/
MongoDB Connector for Hadoop的更多相关文章
- mongoDB BI 分析利器 - PostgreSQL FDW (MongoDB Connector for BI)
背景 mongoDB是近几年迅速崛起的一种文档型数据库,广泛应用于对事务无要求,但是要求较好的开发灵活性,扩展弹性的领域,. 随着企业对数据挖掘需求的增加,用户可能会对存储在mongo中的数据有挖掘需 ...
- 收藏2个mongodb connector网址
https://github.com/plaa/mongo-spark https://github.com/mongodb/mongo-hadoop http://codeforhire.com/2 ...
- Scala2.11.8 spark2.3.1 mongodb connector 2.3.0
import java.sql.DriverManager import com.mongodb.spark._ import org.apache.spark.SparkConf import or ...
- MongoDB资料--Java驱动, Hadoop驱动, Spark使用
MongoDB数据库备份: mongodump -h 192.168.1.160 -d MapLoc -o /usr/local/myjar/mongo/MapLoc/数据库还原:mongoresto ...
- 零售行业下MongoDB在产品目录系统、库存系统、个性推荐系统中的应用【转载】
Retail Reference Architecture Part 1: Building a Flexible, Searchable, Low-Latency Product Catalog P ...
- Hadoop, Python, and NoSQL lead the pack for big data jobs
Hadoop, Python, and NoSQL lead the pack for big data jobs Rise in cloud-based analytics could incr ...
- MongoDB:数据库介绍与基础操作
二.部署在本地服务器 在上次的学习过程中,我们主要进行了MongoDB运行环境的搭建和可视化工具的安装.此次我们将学习MongoDB有关的基本概念和在adminmongo上的基本操作.该文档中的数据库 ...
- Spark连接MongoDB之Scala
MongoDB Connector for Spark Spark Connector Scala Guide spark-shell --jars "mongo-spark-connect ...
- 后Hadoop时代的大数据技术思考:数据即服务
1. Hadoop 的神话正在破灭 IBM leads BigInsights for Hadoop out behind barn. Shots heard IBM has announced th ...
随机推荐
- php单例模式深入讲解
避免多次初始化数据库连接DAO 需要多次初始化数据库连接的场景 场景1: 首先PHP单例模式我觉得只是针对单次页面级请求时出现多个应用场景并需要共享同一对象资源时是非常有意义的 一个类A需要调用多个类 ...
- 关于数据库中varchar/nvarchar类型数据的获取注意事项
当在页面后台获取数据库表中某字段的数据时,需注意该数据的类型.防止因实际数据的字符长度因达不到指定数据类型规定的字符长度而导致空格的占位符. 比如: MSSQL中某一表的结构如下: 表中的数据: ...
- 什么是DNN,Dotnetnuke介绍和功能简介
1. What is DNN? DNN是DotNetNuke(DotNet)的简写.它是在IBUYSPY(IBUYSPY是微软用来推广ASP.NET而推出的范例程序)的基础上发展起来的,是一个免费的. ...
- android-Activity的执行流程
概述 The following diagram shows the important state paths of an Activity. The square rectangles repre ...
- 实现SQLServer数据库转成MYSQL数据库
1.首先需要下载安装工具Navicat Premium. 2.注意:将数据库移至本地SQLServer,我试过直接在局域网上其他SQLServer服务器上想转到本地Mysql好像有问题,想将远程数据库 ...
- (四)Angularjs - 小实例(2)
自定义指令编写时钟 模板 <!-- 模板文件 --><html> <!-- 内置的ng-app指令通知编译器启动AngularJS框架--> <body ng ...
- css3 animation 动画属性简介
animation 动画属性介绍 animation 属性是一个简写属性,用于设置动画属性: 1. animation-name----规定需要绑定到选择器的 keyframe 名称. 语法:anim ...
- Python中的正斜杠与反斜杠
首先,"/"左倾斜是正斜杠,"\"右倾斜是反斜杠,可以记为:除号是正斜杠一般来说对于目录分隔符,Unix和Web用正斜杠/,Windows用反斜杠,但是现在Wi ...
- C#的Reflection总结
什么是反射 在.NET中的反射也可以实现从对象的外部来了解对象(或程序集)内部结构的功能,哪怕你不知道这个对象(或程序集)是个什么东西,另外.NET中的反射还可以运态创建出对象并执行它其中的方法. 反 ...
- Android 的开源电话/通讯/IM聊天项目全集
一.Android的XMPP客户端 Beem Beem 是一个运行于 Android 手机平台的 XMPP (jabber) 的客户端软件,兼容标准的 XMPP 服务器和服务,例如 Ejabberd, ...