Configuring the MapR Database OJAI Connector for Apache Spark

Before using the MapR Database OJAI Connector for Apache Spark, you must edit the pom.xml file for your project.

Add the Spark core dependency into the pom.xml file:

<dependency>
  <groupId>org.apache.spark</groupId>
  <artifactId>spark-core_2.11</artifactId>
  <version>2.1.0-mapr-1703</version>
</dependency>

Add the Spark Maven dependency to the pom.xml file:

<dependency>
  <groupId>com.mapr.db</groupId>
  <artifactId>maprdb-spark</artifactId>
  <version>5.2.1-mapr</version>
</dependency>

To enable Maven to download dependencies, add the following repository information to the pom.xml file:

<repository>
  <id>mapr-releases</id>
  <url>http://repository.mapr.com/maven/</url>
  <snapshots>
    <enabled>false</enabled>
  </snapshots>
  <releases>
    <enabled>true</enabled>
  </releases>
</repository>