You can create MapR-DB tables using the MapR Control System (MCS), the
maprcli command line interface, or the HBase shell. You can also create them at runtime with applications using the supported C APIs or HBase Java APIs. For more about these APIs, see Creating MapR-DB Applications.
When creating a MapR-DB table in MCS or by using the
mapcli, specify a location in the MapR file system in addition to the name of the table. You can create a MapR-DB table anywhere on the cluster that you have write access.
- Because MapR-DB tables, like files, are created by users, MapR tracks table activity in a user's home directory on the cluster. After mounting a cluster on NFS, use the standard Linux
mkdircommand to create a home directory at
/user/<username>on your cluster for each user that will access MapR-DB tables. If a user does not have a corresponding directory under
/useron the cluster, querying MapR for a list of tables that belong to that user generates an error reporting the missing directory.
- Place in a dedicated volume any large tables that will be accessed by high-performing, mission-critical applications. If a volume contains only table data, the CLDB allocates that data across containers in a way that is favorable to performance.
To create MapR-DB tables in MCS:
- After logging into MCS, select MapR Tables in the MapR-FS section of the navigation tree on the left side of the screen. A section with the title MapR Tables opens to the right of the navigation tree.
- Click New Table.
To create MapR-DB tables with the maprcli:
table create command at a command line.
As explained in the documentation for this command:
- For a path on the local cluster, start the path at the volume mount point. For example, for a table named
testunder a volume with a mount point at /volume1, specify the following path:
- For a path on a remote cluster, you must also specify the cluster name in the path. For example, for a table named
sanfranciscocluster, specify the following path:
For a list and description of all of the parameters in this command, see maprcli table create.
The following example demonstrates creation of a table
table02 in cluster location
/user/analysis/tables/. The cluster
my.cluster.com is mounted at
To use the HBase shell to create a MapR-DB table, see the MapR tutorial "Getting Started with HBase Shell".