美文网首页
HBase Shell-建表及插入数据

HBase Shell-建表及插入数据

作者: BoomBoomChips | 来源:发表于2019-10-28 13:04 被阅读0次


根据上面给出的表格,用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

启动hadoop并查看接口的进程号

启动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数据就是再次插入的覆盖数据

相关文章

网友评论

      本文标题:HBase Shell-建表及插入数据

      本文链接:https://www.haomeiwen.com/subject/zxyvvctx.html