Hbase初体验

 

搭建local模式搭建,

官网:http://hbase.apache.org

API:http://hbase.apache.org/apidocs/index.html

download:http://www.apache.org/dyn/closer.cgi/hbase/

 

 

启动报错,提示javahome未设置,修改文件:/jason/hbase-0.98.5-hadoop2/bin/hbase-config.sh 

export JAVA_HOME=/jason/jdk
export PATH=$JAVA_HOME/bin:$PATH

 

如图:

 

启动hbase:

 ./start-hbase.sh 

 

执行hbase  shell

./hbase  shell

 

2014-09-04 11:03:34,508 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.98.5-hadoop2, rUnknown, Mon Aug  4 23:58:06 PDT 2014

hbase(main):001:0> status
2014-09-04 11:03:46,570 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
1 servers, 0 dead, 2.0000 average load

hbase(main):002:0> create 'testtable','colfam1'
0 row(s) in 0.4120 seconds

=> Hbase::Table - testtable
hbase(main):003:0> list 'testtable'
TABLE                                                                                                                                                                              
testtable                                                                                                                                                                          
1 row(s) in 0.0400 seconds

=> ["testtable"]
hbase(main):004:0> put 'testtable','myrow-1','colfam1','value-1'
0 row(s) in 0.1550 seconds

 

hbase(main):008:0> scan 'testtable'
ROW COLUMN+CELL
myrow-1 column=colfam1:, timestamp=1409809952315, value=value-1
1 row(s) in 0.0560 seconds

 

posted on 2014-09-04 15:46  wangbokun  阅读(266)  评论(0编辑  收藏  举报

导航