
根据上面给出的表格,用Hbase Shell模式设计student学生表格:
环境:
操作系统:Linux
Hadoop版本:2.6.0或以上版本
HBase版本:1.1.2或以上版本
启动hadoop
(hadoop安装在/usr/local/下)
1、cd /usr/local/hadoop
2、./sbin/start-dfs.sh

启动HBase
(我的HBase安装在/usr/locald下的local)
1、cd /usr/local/hbase
2、bin/start-hbase.sh

创建表并插入数据

1、建表
create 'Student','name','score'

2、插入数据(key是行键)
put 'Student','95001','score:English','80'
put 'Student','95001','score:Math','86'
put 'Student','95001','score:Computer','77'
Update数据就是再次插入的覆盖数据
网友评论