通过mongo-hadoop(pymongo_spark)从PySpark保存数据到MongoDB
一、背景PySparktoconnecttoMongoDBviamongo-hadoop二、配置步骤(注意版本作相应调整,spark-2.4.3,hadoop2.7,Scala2.11)1.#GettheMongoDBJavaDriver#PROJECT_HOME自定义的项目根目录,下面存放spark等mkdir-p$PROJECT_HOME/libcd$PROJECT_HOMEecho"Fetc