HBase contains a shell that can communicate with HBase. HBase uses the Hadoop file system to store data. All these tasks occur in HDFs. Here are some of the
Common HBase shell commands.
| Data Manipulation language |
| Command |
Description |
Command-expression |
| Create |
Create a table |
Create ' table name ', ' column name 1 ', ' Column Name 2 ', ' Column name n ' |
| Put |
Add a record |
Put ' table name ', ' Row name ', ' Column name: ', ' value ' |
| Get |
View Records |
Get ' table name ', ' Row name ' |
| Count |
View the total number of records in a table |
Count ' table name ' |
| Delete |
Deleting records |
Delete ' table name ', ' Row name ', ' column name ' |
| Scan |
View All data |
Scan "Table name" |
| Scan |
View a table column of data |
Scan "table name", [' Column name: '] |
| Data Definition language |
| List |
List all tables for HBase |
| Disable |
disabling tables |
Disable ' table name ' |
| Is_disabled |
Verify that the table is disabled |
is_disabled ' table name ' |
| Enable |
Enable a table |
Enable ' table name ' |
| Is_enabled |
Verify that the table is enabled |
is_enabled ' table name ' |
| Describe |
Provides a description of a table |
Describe ' table name ' |
| Alter |
Change a table |
| Exists |
Verify that the table exists |
Exists ' table name ' |
| Drop |
To delete a table from HBase |
Drop ' table name ' |
| Drop_all |
Discard the table that matches the "regex" in the command |
| Truncate |
Empty the entire table |
Truncate ' table name ' |
| DeleteAll |
Delete all cells for a given row |
DeleteAll ' table name ', ' Row name ' |