Table Mapping Examples

Example 1: Map all HBase tables to MapR-DB tables in a directory

In this example, any flat table name foo is treated as a MapR-DB table in the directory /tables_dir/foo.

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

Example 2: Map specific Apache HBase tables to specific MapR-DB tables

In this example, the Apache HBase table name mytable1 is treated as a MapR-DB table at /user/aaa/mytable1. The Apache Hbase table name mytable2 is treated as a MapR-DB table at /user/bbb/mytable2. All other Apache HBase table names are treated as stock Apache HBase tables.

<property>
  <name>hbase.table.namespace.mappings</name>
  <value>mytable1:/user/aaa/,mytable2:/user/bbb/</value>
</property>

Example 3: Combination of specific table names and wildcards

Mappings are evaluated in order. In this example, the flat table name mytable1 is treated as a MapR-DB table at /user/aaa/mytable1. The flat table name mytable2 is treated as a MapR-DB table at /user/bbb/mytable2. Any other flat table name foo is treated as a MapR-DB table at /tables_dir/foo.

<property>
  <name>hbase.table.namespace.mappings</name>
  <value>mytable1:/user/aaa/,mytable2:/user/bbb/,*:/tables_dir</value>
</property>