HBase 是Apache Hadoop的数据库,能够对大型数据提供随机、实时的读写访问。下面我们简单介绍一下它的命令。
1 hbase 单机版安装
下载获得hbase-0.90.5.tar.gz====》tar xfz hbase-0.90.5.tar.gz=====>在hbase-0.90.5/conf/hbase-site.xml中编辑hbase数据的存放位置
2 运行hbase
./bin/start-hbase.sh
3 进入hbase shell
./bin/hbase shell
3 创建一个表'test'
create 'test','cf'
4 插入若干数据
put 'test','row1','cf:a','value1'
put 'test','row2','cf:b','value2'
put 'test','row3','cf:c','value3'
5 查询hbase中有多少张表
list
7 查询test表中的数据
scan 'test'
8 查询test 表中某一行的数据
get 'test','row1'
9 使test表无效
disable 'test'
10 删除test表
drop 'test'
11退出hbase shell
exit
12 关闭hbase
./bin/stop-hbase.sh
上面简单列了一下几个常用的命令,下面我们介绍一下hbase 的体系结构