简体   繁体   English

是否可以编写一个mapreduce程序,该程序从hdfs获取输入并将输出写入mongodb

[英]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 嗨伙计们新手mongodb和hadoop.i想写一个mapreduce程序,从hdfs读取输入并写入其输出mongodb.i也试过mongo-hadoop连接器但是在使用连接器时我不知道如何编写mapreduce从hdfs接收输入.i我只能编写mapreduce,它使用mongodb作为输入和输出。如果我能够获得示例代码或任何参考,那将会更有帮助

-Thankyou -谢谢

You can use MongoDB as both a source and destination for data. 您可以将MongoDB用作数据的源和目标。 So yes, you can load data from HDFS into Mongo using the MongoDB Hadoop connector http://docs.mongodb.org/ecosystem/tools/hadoop/ 所以,是的,您可以使用MongoDB Hadoop连接器将数据从HDFS加载到Mongo中http://docs.mongodb.org/ecosystem/tools/hadoop/

You can find examples in their github repository https://github.com/mongodb/mongo-hadoop/tree/master/examples 您可以在他们的github存储库中找到示例https://github.com/mongodb/mongo-hadoop/tree/master/examples

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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