创建表zn_post, 列族cf1
create 'zn_post', 'cf1'
列出已有表
list
查询记录数
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
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/opensource/194455.html