HBase shell commands
This topic describes the main commands available while working with HBase shell.
General commands
These commands are useful for general purposes, such as displaying the current cluster and user information, getting help, etc.
Data definition commands (DDL)
These commands are used to create table schemas and work with them.
Namespace commands
Data manipulation commands (DML)
These commands are useful for working with data stored in HBase tables: reading, writing, deleting, etc.
Tools commands
These commands are intended for experts only. They help to perform operations with Regions, such as: split, merge, compaction, etc. Use them carefully.
Replication commands
These commands are used for configuring replication.
Snapshots commands
These commands allow to work with table snapshots.
Configuration commands
These commands are used to reload configuration parameters without restarting a cluster.
The set of configuration parameters that can be currently changed by this command is limited. See more details in the HBase documentation.
Quotas commands
These commands are used to work with quotas — resource and other restrictions applied to database objects.
Before using the commands from this group, add the following property to hbase-site.xml and restart your cluster.
<property>
<name>hbase.quota.enabled</name>
<value>true</value>
</property>
Security commands
These commands are useful for security configuring needs.
Before using the commands from this group, add the following properties to hbase-site.xml and restart your cluster. If properties hbase.coprocessor.master.classes
or hbase.coprocessor.region.classes
already have another values, use comma-separated lists for keeping several values for them.
<property>
<name>hbase.coprocessor.master.classes</name>
<value>org.apache.hadoop.hbase.security.access.AccessController</value>
</property>
<property>
<name>hbase.coprocessor.region.classes</name>
<value>org.apache.hadoop.hbase.security.access.AccessController</value>
</property>
<property>
<name>hbase.rpc.engine</name>
<value>org.apache.hadoop.hbase.ipc.SecureRpcEngine</value>
</property>
<property>
<name>hbase.security.authorization</name>
<value>true</value>
</property>
Procedures commands
Visibility labels commands
These commands are used to control visibility labels, which permit users, associated with the given label, to read or access cells with that label.
Before using the commands from this group, add the following properties to hbase-site.xml and restart your cluster. If properties hbase.coprocessor.master.classes
or hbase.coprocessor.region.classes
already have another values, use comma-separated lists for keeping several values for them.
<property>
<name>hbase.coprocessor.master.classes</name>
<value>org.apache.hadoop.hbase.security.visibility.VisibilityController</value>
</property>
<property>
<name>hbase.coprocessor.region.classes</name>
<value>org.apache.hadoop.hbase.security.visibility.VisibilityController</value>
</property>
<property>
<name>hbase.security.authorization</name>
<value>true</value>
</property>
<property>
<name>hfile.format.version</name>
<value>3</value>
</property>
Rsgroup commands
These commands allow to manage Region Server groups — logical unions of Region Servers. Each group can mount different tables, if necessary. Thus, each group is equivalent to a logical subcluster. It helps to achieve resource isolation and to reduce management costs. The default Region Server group is called default
.
Before using the commands from this group, add the following properties to hbase-site.xml and restart your cluster. If properties hbase.coprocessor.master.classes
or hbase.coprocessor.region.classes
already have another values, use comma-separated lists for keeping several values for them.
<property>
<name>hbase.coprocessor.master.classes</name>
<value>org.apache.hadoop.hbase.rsgroup.RSGroupAdminEndpoint</value>
</property>
<property>
<name>hbase.master.loadbalancer.class</name>
<value>org.apache.hadoop.hbase.rsgroup.RSGroupBasedLoadBalancer</value>
</property>