Enter HBase Shell console
$HBASE _home/bin/hbase Shell
If you have Kerberos authentication, you need to use the appropriate keytab for authentication (using the Kinit command), and then use the HBase shell to enter the certificate successfully. You can use the WhoAmI command to view the current user
Management of Tables
1) See what tables are available
2) Create a table
# syntax: Create <table> {NAME = <family>, VERSIONS = <versions>} # For example: Creating a table T1, with two family name:f1,f2, and Version number is 2 hbase (main) > create ' t1 ', {NAME = ' F1 ', VERSIONS = 2},{name = ' F2 ', VERSIONS = 2} |
3) Delete Table
Two steps: First disable, then drop
Example: Delete Table T1
HBase (Main) > Disable ' T1 ' hbase (Main) > drop ' t1 ' |
4) View the structure of the table
# syntax: Describe <table> # example: View the structure of a table T1 HBase (main) > describe |