Common operations Summary for HBase Shell

Source: Internet
Author: User

 1, creating table: Create ' t1 ', ' F1 ', ' F2 ', ' F3 '                   #-------T1 is the table name, F1,F2 , F3 is the column family name  2, view all tables: list 3, view the structure of the table: describe ' t1 '  4, add a column family: Disable ' T1 '           & nbsp                 alter ' T1 ', name=> ' F1 ', versions=>3      &NBS P                     enable ' T1 '  5, delete a column family: Disable ' T1 '                             alter ' T1 ', name=> ' F1 ', method=> ' Delete '         #--------Note Case (abbreviated: Alter ' t1 ', ' delete ' = ' F1 ')           &N Bsp                 enable ' T1 '  6 to see if a table exists: Exists ' T1 '  7 to see if the table structure allows modification: is_ Enable ' T1 '  8, delete a table: Disable ' t1 '                         & Nbsp;drop ' T1 '                          enable ' t1 '  9 to insert data into the table: put ' t1 ', ' r 1 ', ' f1:c1 ', ' value '           #--------Insert a value 24 for the C1 column of the F1 column family for the R1 row key of the T1 table, the column family column can not exist beforehand, the modified data is put, Just row and column can be  10, delete a row of data column [value]:delete ' t1 ', ' R1 ', ' C1 ', ts1       #--------Delete T1 table, row jian R1 in C1 column, timestamp ts1 value, If you delete all column values without specifying TS1, it is clear that the column for that row is no longer present.  11, delete a row of data: DeleteAll ' t1 ', R1 '  12, gets the column values for all column families of a row health: Get ' t1 ', ' R1 '  13, get column values for all of a row-healthy column family: Get ' t1 ', ' R1 ', ' F1 '         Get column values for some two column families of a row jian: get ' t1 ', ' R1 ', ' F1 ', ' F2 '  14, get a column value for a column family of a row health: Get ' t1 ', ' R1 ', ' f1:c1 '  15, get all the row health values for a table: Scan ' t1 '  16, get the first 3 rows of a table: Scan ' t1 ', {limit=>3} 17, get a table of rows starting at the specified position: Scan ' T1 ', { Startrow=> ' RowKey ',  limit=>3}       18, gets all row data for a specified column of a table: Scan ' Heroes ', {COLUMNS = ' F1:c1 '} 19, rows of statistics: count ' T1 '  

20, empty table: Truncate ' t1 '

Actual execution process: disabling ' t1 ' dropping ' t1 ' Creating ' t1 ' 21,shell script execution mode : HBase Shell Test.hbaseshell Reprint Please specify Source: http://www.cnblogs.com/pengineer/p/4688525.html

Common operations Summary for HBase Shell

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.