文章目录

在centos系统下安装了hbase,以下为具体操作:

1、进入hbase安装目录:
cd/ideas/hbase/hbase-0.96.2-hadoop2/bin/
2、启动hbase:
./hbase shell
3、查看hbase中的所有表:
list
4、查看hbase中某一个表的表描述:
describe ‘tablename’
5、hbase利用scan查询表中内容:
scan ‘tablename’
6、在Xshell5中输入有误的修改方法:
“<-“键 +”Delete”键
7、hbase建表:
create ‘tablename’,’列簇1name’,’列簇2name’……
8、向表中插入数据:
put ‘tablename’,’列簇1name:列name’,’值’
put ‘tablename’,’列簇2name:列name’,’值’
例子:
create ‘emp’,’info’,’data’
put ‘emp’,’rk001’,’info:name’,’kele’
put ‘emp’,’rk001’,’info:sex’,’female’
put ‘emp’,’rk001’,’data:age’,’11’
put ‘emp’,’rk001’,’info:size’,’30’

文章目录