码迷,mamicode.com
首页 > 其他好文 > 详细

Hbase初体验

时间:2014-09-04 16:42:39      阅读:222      评论:0      收藏:0      [点我收藏+]

标签:blog   http   os   io   java   ar   for   文件   2014   

 

搭建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

 

如图:

bubuko.com,布布扣

 

启动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

 

Hbase初体验

标签:blog   http   os   io   java   ar   for   文件   2014   

原文地址:http://www.cnblogs.com/bokun-wang/p/3956248.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!