hbase-shell

作者: 海德堡绝尘 | 来源:发表于2018-01-22 19:20 被阅读11次
    1. 创建表zn_post, 列族cf1
      create 'zn_post', 'cf1'
    1. 列出已有表
      list
    1. 查询记录数
      count 'zn_post'
    1. 插入记录
    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'
    
    1. 扫描表记录
      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

    相关文章

      网友评论

        本文标题:hbase-shell

        本文链接:https://www.haomeiwen.com/subject/uolraxtx.html