HBase Shell overview
You can use the HBase Shell from the command line interface to communicate with HBase.
In CDP, you need to SSH into an HBase node before you can use the HBase Shell. For example,
to SSH into an HBase node with the IP address 10.10.10.10, you must use the command:
ssh <username>@10.10.10.10
After you have started HBase,
you can access the database in an interactive way by using the HBase Shell, which is a command
interpreter for HBase which is written in Ruby. Always run HBase administrative commands such
as the HBase Shell,
hbck
, or bulk-load commands as the HBase user (typically
hbase
).hbase shell
You can use the following commands to get started with the HBase shell:
- To get help and to see all available commands, use the
help
command. - To get help on a specific command, use
help "command"
. For example:hbase> help "create"
- To remove an attribute from a table or column family or reset it to its default value,
set its value to
nil
. For example, use the following command to remove theKEEP_DELETED_CELLS
attribute from thef1
column of theusers
table:hbase> alter 'users', { NAME => 'f1', KEEP_DELETED_CELLS => nil }
- To exit the HBase Shell, type
quit
.