问题
I am wondering whether map reduce job in mongodb has anything to do with Hadoop. Mapreduce in Mongodb is a standalone and no dependency on any hadoop installation? If what I am guessing is correct, then the map reduce syntax is the same between the two or it just means that mongodb is supporting its own map reduce (with different syntax)?
回答1:
Map Reduce is not fastest interface in mongodb to do ad hoc queries it is more designed for background jobs, creating reports etc. I wrote some time ago how to do it on my blog
http://no-fucking-idea.com/blog/2012/04/01/using-map-reduce-with-mongodb/
回答2:
MongoDB has its own MapReduce. You write map/reduce/finalize functions in javascript (as opposed to Hadoop and Java).
They say that it is also possible to use Hadoop on top of MongoDB, but I didn't try that yet.
回答3:
MongoDB borrowed the idea of mapreduce, which btw predates hadoop, it was used at google on their infrastructure (and they also borrowed the idea from functional programming languages).
The "syntax" is also totally different (note: there are several APIs for hadoop for different languages so it's impossible to make a comparison).
来源:https://stackoverflow.com/questions/9934829/mapreduce-in-mongodb