Stratio / Spark-MongoDB

Spark library for easy MongoDB access
http://www.stratio.com
Apache License 2.0
307 stars 96 forks source link

Not picking the local host ip #152

Open RSamal opened 8 years ago

RSamal commented 8 years ago

Hi,

The driver always picks the public ip (hostname -i) even if I am providing the localhost ip. I want to connect to localhost(127.0.0.1) as my port 20717 is mapped to that ip only. But each time it tries to connect to the public ip and gets timeout error.

sqlContext.sql("CREATE TABLE IF NOT EXISTS xxx USING com.stratio.datasource.mongodb OPTIONS (host '127.0.0.1:27017', database 'pd', collection 'xxx')")