使用Docker容器快速体验HBASE

2022-03-22  本文已影响0人  万州客

一条龙,应该玩的,都玩起来~

参考URL:
https://www.jianshu.com/p/c971d5c21633

一,下载并运行hbase的docker容器

不开端口

docker run -d --name hbase -P harisekhon/hbase:1.3

开很多端口

docker run -d --name hbase -p 2181:2181 -p 8080:8080 -p 8085:8085 -p 9090:9090 -p 9095:9095 -p 16000:16000 -p 16010:16010 -p 16201:16201 -p 16301:16301  harisekhon/hbase:1.3

二,进入容器实践

docker exec -it hbase /bin/bash
hbase shell
list
create 'student','info'
put 'student','1001','info:sex','male'
put 'student','1001','info:age','18'
put 'student','1002','info:name', 'Janna'
put 'student','1002','info:sex','female'
put 'student','1002','info:age','20'
scan 'student'
scan 'student', {STARTROW => '1001', STOPROW => '1002'}
describe 'student'
2022-03-20 11_49_37-悬浮球.png
2022-03-20 11_50_08-FinalShell 3.9.3.4.png

三,WEB上也能看到相关数据表

2022-03-20 11_51_09-悬浮球.png
上一篇 下一篇

猜你喜欢

热点阅读