Editing Tables
Use either the maprcli
command table edit
or the
Control System to edit the attributes of a MapR Database binary or
JSON table. You can also use the HBase shell to edit a binary table.
Editing Tables Using the Control System
About this task
To edit a (JSON or Binary) table using the Control System:
Procedure
- Go to the table information page.
- Click Edit Table to display the Edit Table page.
-
Make changes (optional) to the following properties:
Metrics Interval The interval of time for logging metrics. Auto Split Enable (Yes) or disable (No) auto-splitting of table. If enabled, the table will be split automatically into regions as the table grows. If disabled, the table can be split manually into regions. By default, this is enabled. Bulkload Enable (Yes) or disable (No) full bulk load of the table. Enable Auditing Enable (Yes) or disable (No) auditing of table operations. If auditing is enabled at the cluster and volume levels, enabling auditing will cause auditing to start for the table. -
Make changes (optional) to table administration control settings.
- Click Save Changes for the changes to take effect.
Editing Tables Using the CLI or the REST API
About this task
Run the command maprcli table edit -path <path>
.
- For a path on the local cluster, start the path at the volume mount point. For
example, for a table named
test
under a volume with a mount point at /volume1, specify the following path:/volume1/test
- For a path on a remote cluster, you must also specify the cluster name in the
path. For example, for a table named
customer
undervolume1
in thesanfrancisco
cluster, specify the following path:/mapr/sanfrancisco/volume1/customer
NOTE You cannot use the following characters in the table name:To use the following characters in the table name, enclose them either in single or double quotes:< > ? % \
For example:; | ( ) /
maprcli table create -path "/設備^=#;{}&()/" (or) maprcli table create -path '/設備^=#;{}&()/'
To use either the ' or the " character in the table name, enclose:For example:- the ' character within double quotes (")
- the " character within single quote (')
maprcli table create -path "/'設備^=#;{}&()/" (or) maprcli table create -path '/"設備^=#;{}&()/'
When you edit a table with this command, you can change a number of properties.
- Enable or disable auditing, autosplitting, and bulkloading
- Set permissions on table
- Set permissions for default column families
For full reference for this command, see the table edit
command.
Editing Binary Tables Using HBase Shell
About this task
After starting the HBase shell, run the alter
command. Type
help
to see a list of commands and their syntax.