HBase Common shell commands

Source: Internet
Author: User
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
HBase (main) > WhoAmI
Management of Tables
1) See what tables are available
HBase (main) > list

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
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.