MapR 5.0 Documentation : Sample Application for Accessing MapR-DB Tables

The sample application is located in the /opt/mapr/examples/sample directory.

Prerequisite for compiling and running this sample application

Install the mapr-client package on the node where you will build the application. See Installing the mapr-clientpackage for the steps. If the mapr-core package is already installed, you do not need to install the mapr-client package.

Compiling this sample application

To compile and run this sample application, read the instructions in the README file in the /opt/mapr/examples/sample directory.

The sample application performs these operations:

  1. Set the log level and specify the log stream.
  2. Create a connection.
  3. Create a table.
  4. Create a client.
  5. Asynchronously put ten rows of one cell each.
  6. Asynchronously put two cells in a single row.
  7. Asynchronously put a second version in one column of one row
  8. Scan the entire table.
  9. Fetch a row that has two cells.
  10. Delete a specific version of a column in the row that was fetched.
  11. Fetch the same row as before.
  12. Destroy the client and the connection.