5 min read
MapR Database is a powerful NoSQL database built into the MapR Distribution including Apache Hadoop with a proven record of performance, scale, and reliability. It recently gained document database capabilities with native JSON support, and is now available as a developer preview package. You can freely download it as a VMware image, a VirtualBox image, and a Docker container, and it also can be run as an Amazon Web Services AMI.
This blog describes how to get an instance of the MapR Database Document Database Developer Preview image running on Amazon AWS using one of the pre-configured AMI images supplied by MapR. With this AMI, you can start writing JSON-based applications on MapR Database using the open source Open JSON Application Interface, or OJAI (pronounced OH-hy, like the idyllic town in Southern California).
First, connect and login to your Amazon AWS account and select the EC2 Dashboard. Begin launching a new instance by pressing “Launch Instance.”
Depending on your preference of AWS region and/or availability zone, you may deploy one of the following three AMI options:
Ensure that you are using the correct region before performing the below step. For example, if you prefer to use the US-West-1 region, be sure the region shows on the upper right hand side of the screen as “N. California.” This is what we will use for this example, other regions will appear similarly.
Enter one of the AMI IDs from your selection above in the search box, after selecting “Community AMIs.” You should see an entry showing the MapR Database/OJAI image. Press “Select.”
Next, select the Instance Type. We recommend using the m4.xlarge instance type for this configuration to ensure that you have enough RAM and CPU resources to explore the functionality. You can choose use a larger instance type if you want more resources.
You may now select “Configure Instance Details” to configure parameters specific to your environment and/or configuration. For example, you may want to optionally change parameters such as these:
After pressing “Review and Launch,” you may get a screen regarding SSD options. You can leave this as the default/recommended setting.
The last step in launching the AMI is to review the details on the final screen, then press “Launch.”
You will now be prompted to select which keypair to use for the image. You can either select an existing keypair or create a new one. This will be used to configure ssh access to the image.
If you are creating a new key pair, you must download the key pair to your local machine before proceeding.
You should now be able to use “ssh” to access the Developer Preview, using a Linux, Mac, or Windows machine running an ssh client.
For example, if you are connecting from an external machine outside of AWS, you can connect to the external IP address shown in the EC2 Dashboard as follows:
ssh -i ./maprdb.pem -l mapr
where “maprdb.pem” is the keyfile you downloaded during launch, and
You should now have access to a shell on the machine.
The machine image contains a running instance of MapR Database with the OJAI interface. The API is implemented in Java but bindings for other languages, such as Python and Node.js. are available. Visit the Developer Preview web page for pointers.
The following information can help you get started persisting JSON data to the image and programmatically using the API:
Questions? Consult the Developer Forum here: https://groups.google.com/forum/#!forum/maprdb-user
Stay ahead of the bleeding edge...get the best of Big Data in your inbox.