MongoDB & Spark: difference between mongo-hadoop and mongo-spark

五迷三道 提交于 2019-12-08 12:48:32

问题


what is the difference between mongo-hadoop and mongo-spark connector and does pymongo work only with mango-hadoop?

Is pymongo used only with mongo-hadoop?


回答1:


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 including the following:

  1. Pig
  2. Spark
  3. MapReduce
  4. Hadoop Streaming
  5. Hive
  6. Flume

The MongoDB Connector for Spark provides integration between MongoDB and Apache Spark.

With the connector, you have access to all Spark libraries for use with MongoDB datasets: Datasets for analysis with SQL (benefiting from automatic schema inference), streaming, machine learning, and graph APIs. You can also use the connector with the Spark Shell.

PyMongo doesn't provide any support for PySpark, but the Spark connector does:

https://docs.mongodb.com/spark-connector/master/python-api/



来源:https://stackoverflow.com/questions/51257647/mongodb-spark-difference-between-mongo-hadoop-and-mongo-spark

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!