-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 0.1
-
Component/s: Configuration
-
None
Currently invalid URI's will throw an error but it can be unclear as to what the cause of the error is.
====
Was: Trim Empty / White Space From MongoDB URI Parameters
Trailing whitespace on MongoURI parameter causes an IllegalArgumentException. Example follows.
vagrant@vagrant-ubuntu-trusty-64:~/spark-1.6.1$ ./bin/spark-shell --packages org.mongodb.spark:mongo-spark-connector_2.10:0.1 --conf "spark.mongodb.input.uri=mongodb://127.0.0.1/test.coll?readPreference=primaryPreferred > " ... scala> val rdd = sc.loadFromMongoDB() java.lang.IllegalArgumentException: No match for read preference of primaryPreferred at com.mongodb.ReadPreference.valueOf(ReadPreference.java:237)
- related to
-
JAVA-2167 Trim Empty / White Space From Connection String
- Closed