简体   繁体   中英

Is it possible to write a mapreduce program that takes input from hdfs and writes output to mongodb

Hi guys im new to mongodb and hadoop.i want to write a mapreduce program that reads input from hdfs and writes its output mongodb.i also tried mongo-hadoop connector but while using connector i dont know how to write mapreduce that takes input from hdfs .i am only able to write mapreduce that uses mongodb for both input and output.it would be more help full if i was able to get sample codes or any reference

-Thankyou

You can use MongoDB as both a source and destination for data. So yes, you can load data from HDFS into Mongo using the MongoDB Hadoop connector http://docs.mongodb.org/ecosystem/tools/hadoop/

You can find examples in their github repository https://github.com/mongodb/mongo-hadoop/tree/master/examples

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM