HBase 建表新增数据记录

login as: root
root@192.168.12.23's password: *********
Last login: Wed Aug 20 00:41:17 2014 from 192.168.12.67
[root@testHostName1 ~]# create 'testTable','testColumn'
-bash: create: command not found
[root@testHostName1 ~]# hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.94.7, r1471806, Wed Apr 24 18:44:36 PDT 2013

hbase(main):001:0> create 'testTable','testColumn'
0 row(s) in 2.1450 seconds

hbase(main):002:0> put 'testTable','row1','testColumn:a','value1'
0 row(s) in 0.1360 seconds

hbase(main):003:0> put 'testTable','row2','testColumn:b','value2'
0 row(s) in 0.0270 seconds

hbase(main):004:0> put 'testTable','row3','testColumn:c','value3'
0 row(s) in 0.0210 seconds

hbase(main):005:0> scan 'testTable'
ROW                          COLUMN+CELL
 row1                        column=testColumn:a, timestamp=1408526740391, value=value1
 row2                        column=testColumn:b, timestamp=1408526771900, value=value2
 row3                        column=testColumn:c, timestamp=1408526783253, value=value3
3 row(s) in 0.0870 seconds
hbase(main):008:0> get 'testTable','row1'
COLUMN      CELL
cf:a        timestamp=1288380727188, value=value1
1 row(s) in 0.0400 seconds

disable 再 drop 这张表,可以清除你刚刚的操作
hbase(main):012:0> disable 'testTable'
0 row(s) in 1.0930 seconds
hbase(main):013:0> drop 'test'
0 row(s) in 0.0770 seconds 

关闭shell
hbase(main):014:0> exit                   

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值