- 創(chuàng)建表zn_post, 列族cf1
create 'zn_post', 'cf1'
- 列出已有表
list
- 查詢記錄數(shù)
count 'zn_post'
- 插入記錄
put 'zn_post', '20180122-10000001', 'cf1:name', 'niewj'
put 'zn_post', '20180122-10000002', 'cf1:name', 'johnson'
put 'zn_post', '20180122-10000003', 'cf1:name', '絕塵'
put 'zn_post', '20180122-10000003', 'cf1:title', 'engineer'
- 掃描表記錄
scan 'zn_post'
hbase(main):048:0> scan 'zn_post'
ROW COLUMN+CELL
20180122-10000001 column=cf1:name, timestamp=1516617050624, value=niewj
20180122-10000002 column=cf1:name, timestamp=1516619708401, value=johnson
20180122-10000003 column=cf1:name, timestamp=1516619741437, value=\xE7\xBB\x9D\xE5\xB0\x98