Apache HBase Shell is used to communicate with HBase. HBase uses Hadoop HDFS to store data. HBase has master and region server architecture. The data stored in HBase will be in a form of the region (tables) which are split up and stored in region servers. HBase master server manages these region servers.
To start Apache HBase Shell, run the below command.
Apache HBase Commands
Let us see some commands supported by Apache HBase Shell.
1. HBase Basic Commands
These are basic HBase commands which are used to see the version, status of HBase, and so on.
|Commands||Description||version||This command is used to provide the version of HBase currently in use.||table_help||This command is used to provide help for table reference commands.||status||This command is used to provide the status of HBase, for example, the number of servers.||whoami||This command is used to provide information about the user.|
2. HBase DDL Commands
These commands are used to create a table, list table, disable the table, enable table, and so on.
|Commands||Description||create||It is used for creating tables.||list||This command is used to list all the tables in HBase.||disable||This command is used to disable a table.||exists||This command is used to verify the existence of a table.||drop||This command is used to drop a table from HBase.||drop_all||This command is used to drop the tables matching in the command.||is_disabled||This command is used to verify whether a table is disabled.||enable||This command is used to enable a table.||is_enabled||This command is used to verify whether a table is enabled.||describe||This command is used to describe a table.||alter||This command is used to alter a table.||Java Admin API||Using JAVA API, DDL functionalities can be performed. This package “org.apache.hadoop.hbase.client” is used in JAVA API.|
3. HBase DML Commands
These commands are used to put a value in a column, disable, drop, and recreate a specified table, delete all cells in a row, and so on.
|Commands||Description||put||This command is used to put a cell value at a specified column in a specified row in a particular table.||get||This command is used to fetch the content of a row or a cell.||delete||This command is used to delete a cell value in a table.||deleteall||This command is used to delete all the cells in a given row.||scan||This command is used to scans and return the table data.||count||This command is used to count and return the number of rows in a table.||truncate||This command is used to disable, drop, and recreate a specified table.||Java client API||Using JAVA API, DML functionalities can be performed. This package “org.apache.hadoop.hbase.client” is used in JAVA API.|