Basic operation of hbase
1. Shell operation
Common commands:
[root@hadoop01 ~] # hbase shell # enter HBASE client hbase (main): 001hbase 0 > help "dml" # prompt to get a set of commands hbase (main): 001hbase 0 > help "put" prompt to get a single command help hbase (main): 001hbase 0 > exit # exit client # View all tables in hbase hbase (main): 001hbase 0 > list
Create a table:
Syntax: create 'table name', 'column cluster 1,' column cluster 2, column cluster 3, column cluster 3.
Example 1: create a table named user, which has two column clusters, info and data, hbase (main): 001main 0 > create 'user',' info','data'hbase (main): 001data 0 > create 'user', {NAME= >' info'}, {NAME= > 'data'}