You can access the data-fabric cluster running in the development-environment container from your laptop. Simply issue client commands from your laptop.
The Container for Developers is setup with only users
mapr and root. If you want to connect clients as some
other user, you must add your user name and group to the container.
For example, if running the id command on your laptop returns the
following:
uid=5001(mapruser) gid=5000(maprgroup)
Then, run the following commands to add your user name and group to the container:
ssh root@localhost -p 2222
groupadd -g 5000 maprgroup
useradd -m -u 5001 -gmaprgroup mapruser
/opt/mapr/bin/hadoop fs -ls //opt/mapr/bin/mapr dbshellcreate /tmp/t1
insert /tmp/t1 --v '{"a":"ABC"}' --id "ID1"
find /tmp/t1The data-fabric client that you downloaded in the Prerequisites to Running the Development Environment for HPE Ezmeral Data Fabric topic includes a minimum set of clients. To run other clients, you must first copy the client software to your laptop.
The following example shows how to do this for Apache Drill 1.16.1:
<container-id> by examining the output of
the docker ps command<container-id>:docker cp <container-id>:/opt/mapr/drill /opt/mapr/drillmapr through JDBC by running
sqlline:/opt/mapr/drill/drill-1.16.1/bin/sqlline -u "jdbc:drill:drillbit=localhost" -n maprsqlline:select * from cp.'employee.json' limit 10;
Sample applications are available at https://github.com/mapr-demos/mapr-db-60-getting-started. The applications show you how to access a HPE Ezmeral Data Fabric Database 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.