Hbase Shell operations (full record)

Source: Internet
Author: User

1. Enter the HBase command line

>hbase Shell

Exit command line

>quit

2. Create a table

>create ' users ', ' user_id ', ' address ', ' info '

3. View All Tables

>list

4. View table Structure

>describe ' users '

5. Delete the table:

>disable ' users ' >drop ' users '

6. New Data

>put ' users ', ' Xiaowang ', ' info:age ', ' >put ' users ', ' xiaoming ', ' address:city ', ' Beijing ' >put ' users ', ' Xiaowang ', ' address:city ', ' Shagnhai '

7. Modify the Data

>put ' users ', ' xiaoming ', ' info:age ', ' 27 '

8. Get row information

>get ' users ', ' xiaoming '


9. Get column Information

>get ' users ', ' xiaoming ', ' info:age '

10. Get Column versions information (do not specify the default to save 3 versions of data when building a table)

>get ' users ', ' xiaoming ', {column= ' Info:age ', versions=>3}


11. Get data for a version of column (timestamp specifies the current timestamp for insertion)

>get ' users ', ' xiaoming ', {column= ' Info:age ', timestamp=>15134937056}

12. Full Table Scan

>scan ' users '

13. Delete Column

>delete ' users ', ' xiaoming ', ' info:age '

14. Delete Row

>deleteall ' users ', ' Xiaowang '

15. Number of rows of statistics

>count ' users '

16. Clear the table

>truncate ' users '





My personal website: http://www.caicongyang.com;

My csdn blog address: Http://blog.csdn.net/caicongyang;





Hbase Shell operations (full record)

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.