Passing the MapR-DB Table Path

This topic describes the methods for passing a MapR-DB table name. Binary table names can be passed by either specifying the table path in the API or by setting the table path in the core-site.xml file. JSON table names are passed by specifying the table path in the API.

Specifying the Table Path in the API

With this method, you provide the complete path to the table using the following format: /mapr/<cluster>/<volume>/<table>

Note: This format is independent of the programming language. This method is used for both MapR-DB binary and JSON tables.
For example, if you were adding a new column family to a table and you had the following information:
  • Cluster name: newyork
  • Volume name: vol1
  • Table name: table1
The table path would be /mapr/newyork/vol1/table1

Specifying the Table Path in the core-site.xml File

With this method, you specify the table path with hbase.table.namespace.mappings property in the /opt/mapr/hadoop/hadoop-2.7.0/etc/hadoop/core-site.xml file.

Note: This method is specific to MapR-DB binary tables only. This method is independent of the programming language.

In the following example, all tables that you create and access via the API, will be in the /tables_dir1 directory. If you specified the table name table1 in the API, the full path to the table would be /tables_dir1/table1.

<property>
   <name>hbase.table.namespace.mappings</name>
   <value>*:/tables_dir1</value>
</property>