Installation

About this task

Follow these steps to install and configure MapR Database.

Install MapR Database

About this task

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 Database 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

About this task

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

Procedure

  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

About this task

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

<repositories>
    <repository>
        <id>mapr-releases</id>
        <url>https://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>