Mongo Spark连接器,带有多个主机

时间:2017-04-06 13:20:06

标签: mongodb apache-spark connector

我尝试使用mongo-spark-connector_2.10-2.0.0将Spark连接到MongoDB但是当我在URI中有多个主机时它不起作用

我的URI看起来像这样:

mongodb://login:password@cluster0-shard-0xxxxx:27017,cluster0-shard-0yyyyy:27017,cluster0-shard-0zzzzz:27017/database?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin

我得到这样的错误

Command failed with error 8000: 'no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.' on server cluster0-shard-0xxxxx

它适用于只有1个主机的其他URI。

1 个答案:

答案 0 :(得分:0)

问题是我使用的是需要SNI的Atlas Free层,而mongo-spark-connector_2.10-2.0.0目前使用的Mongo Java驱动程序不支持SNI。

相关问题