- Connect to a MapR Edge node and gather the required binaries and configuration files, then download them to your local machine.
- Upload the gathered files into a Domino project to allow access by the Domino environment builder.
- Create a new Domino environment that uses the uploaded files to enable connections to your cluster.
- Enable YARN integration for the Domino projects that you want to use with the MapR cluster.
Gather the required binaries and configuration files
You will find most of the necessary files for setting up your Domino environment on your MapR Edge node. To get started, connect to the Edge node via SSH, then follow the steps below.-
Create a directory named
hadoop-binaries-configsat/tmp. -
Copy
hive-site.xmlfrom/opt/mapr/spark/spark-<version>/confto/tmp/hadoop-binaries-configs/. Be sure to replace the<version>string in the command below with the number that matches the folder name on your edge node. -
Copy the
ssl_truststorefrom/opt/mapr/confto/tmp/hadoop-binaries-configs/. -
After you’ve copied the above files into
/tmp/hadoop-binaries-configs, zip the directory for transfer to your local machine.Then useSCPfrom your local machine to download the zipped archive. After transfer, extract the files to your local filesystem and keep them handy for a future step where they will be uploaded to Domino. -
On the MapR edge node, run the following command to identify the version of Java running on the cluster.
You must then download a JDK .tar file from the Oracle downloads page that matches that version. The filename will have a name like the following:Keep this JDK handy for use in a future step.
Upload the binaries and configuration files to Domino
Use the following procedure to upload the files you retrieved in the previous step to a public Domino project. This will make the files available to the Domino environment builder.- Log in to Domino, then create a new public project.
- Open the Code page for the new project, then click browse for files and select the files you downloaded from the MapR edge node, and the JDK you downloaded from Oracle. Then click Upload.
-
From the Code page of your project, click New File. Name the file
run-client.sh, and in its contents you must construct an invocation of the MapRconfigure.shscript that is valid for setting up a client to connect to your cluster. A full explanation of how to invoke this script is beyond the scope of this document. Read the full documentation on the script from MapR, and consider the following example.run-client.sh -
After your project contains the files from the MapR edge node, the correct JDK, and a
run-client.shscript that wraps the MapR configuration script, click the gear menu next to each of those files, then right click Download and click Copy Link Address. Save these URLs in your notes, as you will need them in the next step. After you have recorded the download URL of the binaries and configuration files, you’re ready to build a Domino environment for connecting to MapR.
Create a Domino Environment for connecting to MapR
- Click Environments from the Domino main menu, then click Create Environment.
- Give the environment an informative name, then choose a base environment that includes the version of Python that is installed on the nodes of your MapR cluster. Most Linux distributions ship with Python 2.7 by default, so you will see the Domino Analytics Distribution for Python 2.7 used as the base image in the following examples. Click Create when finished.
-
After creating the environment, click Edit Definition. Copy the below example into your Dockerfile instructions, then be sure to edit it wherever necessary with values specific to your deployment and cluster.
In this Dockerfile, wherever you see a hyphenated instruction enclosed in angle brackets like
<paste-your-domino-download-url-here>, be sure to replace it with the corresponding values you recorded in previous steps. You may also need to edit commands that follow to match downloaded filenames. -
Scroll down to the Pre Run Script field and add the following lines, being sure to match the Spark version in the directory name to the one being set up by the Dockerfile instructions.
-
(Optional) If you want to store and access MapR user tickets as Domino environment variables, follow these additional steps.
-
Request a long-running MapR ticket from your cluster administrator, and copy its contents to your local machine. The ticket will be formatted as:
<cluster-name> <token> -
Add that token as a Domino environment variable to your Domino user account with the name
USERTICKET. -
Add the following lines to the bottom of the Pre Run Script field for the environment you edited previously:
If you do this, every user that wants to use this environment must set up a
USERTICKETenvironment variable as described in the previous step.
-
Request a long-running MapR ticket from your cluster administrator, and copy its contents to your local machine. The ticket will be formatted as:
- Click Build when finished editing the Dockerfile instructions. If the build completes successfully, you are ready to try using the environment.
Configure a Domino Project for use with a MapR cluster
This procedure assumes that an environment with the necessary client software has been created according to the instructions above. Ask your Domino administrator for access to such an environment.- Open the Domino project you want to use with your MapR cluster, then click Settings from the project menu.
- On the Integrations tab, click to select YARN integration from the Apache Spark panel, then click Save. You should not need to edit any of the fields in this section.
- On the Hardware & Environment tab, change the project default environment to the one you built earlier with the binaries and configuration files.