Using Apache Spark to Query a Remote Authenticated MongoDB Server

1. Download and Extract Spark

$ wget http://apache.spinellicreations.com/spark/spark-2.4.0/spark-2.4.0-bin-hadoop2.7.tgz
$ tar -xf spark-2.4.0-bin-hadoop2.7.tgz
$ cd spark-2.4.0-bin-hadoop2.7

Create a spark-defaults.conf file by copying spark-defaults.conf.template in conf/.

Add the below line to the conf file.