Connecting Clients to the MapR Container for Developers

You can access the MapR cluster running in the MapR Container for Developers from your laptop. Simply issue client commands from your laptop.

Accessing the File System

The following command lists the files in MapR-FS on the cluster:
/opt/mapr/bin/hadoop fs -ls /

Accessing MapR-DB

To access MapR-DB, you can use MapR-DB shell:
/opt/mapr/bin/mapr dbshell
In MapR-DB shell, you can create a table, insert into the table, and read from the table:
create /tmp/t1
insert /tmp/t1 --v '{"a":"ABC"}' --id "ID1"
find /tmp/t1

Accessing Drill

The MapR client downloaded in the Prerequisites to Running the MapR Container for Developers topic includes a minimum set of clients. To run other clients, you must first copy the client software to your laptop.

The following shows how to do this for Apache Drill:

  1. Determine your docker <container-id> by examining the output of the docker ps command
  2. Copy Drill from your container to your laptop specifying the <container-id>:
    docker cp <container-id>:/opt/mapr/drill /opt/mapr/drill
  3. Connect to Drill as user mapr through JDBC by running sqlline:
    /opt/mapr/drill/drill-1.11.0/bin/sqlline -u "jdbc:drill:drillbit=localhost" -n mapr
  4. Run a SQL query in sqlline:
    select * from cp.`employee.json` limit 10;

Demo Applications

Sample applications are available at The applications show you how to access a MapR-DB JSON table using the following programming interfaces:

See the README file in the github repository for detailed steps on how to create the data used in the applications and how to run the applications.