Installation

Follow these steps to install and configure MapR-DB.

Install MapR-DB

The MapR Sandbox is available as a virtual machine (VM) so the installation is straightforward.

The VM is configured to use a host-only network. Check that you have a host-only network configured in your environment.

Add the IP address of the VM to your /etc/hosts file. On Windows:
Windows\System32\drivers\etc\hosts
In the /etc/hosts file, use the MapR-DB machine name maprdemo.
The VM is a CentOS Linux. You can connect to it using SSH:
# password is mapr
ssh mapr@maprdemo

Set MAPR_HOME on Your Host

On your host Windows, Mac OSX, or Linux machine where you will write and run your Java applications, follow these steps:

  1. Create the following directory structure:
    /opt/mapr/conf  (for Linux and OSX)
    C:\opt\mapr\conf (for Windows)
  2. If you have a MapR client installed on your machine (existing /opt/mapr folder), use it; otherwise, create a new folder. Use an arbitrary name for the folder. For example:/opt/mapr_51
  3. Create a file in this folder named mapr-clusters.conf.
  4. Add the following line to this file:
    demo.mapr.com maprdemo:7222
    Note: maprdemo is the host name or IP address of the VM where the MapR Sandbox is running.

Java Library

In the sample application, you will see the entries required in your Maven pom.xml file:

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

<dependencies>
  <dependency>
    <groupId>com.mapr.db</groupId>
    <artifactId>maprdb</artifactId>
    <version>5.1.0-mapr</version>
  </dependency>
</dependencies>