hbase是一个分布式的NoSQL,部署起来配置很多东西,开发起来太慢,可以使用docker快速搭建环境
gs@gs-virtual-machine:~$ sudo docker run -ti harisekhon/hbase
================================================================================
HBase Docker Container
================================================================================created directory: '/hbase/logs'
Starting local Zookeeper
Starting HBase
localhost: /hbase/bin/zookeepers.sh: line 52: ssh: command not found
starting master, logging to /hbase/bin/../logs/hbase--master-2e2b60fb647e.out
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
starting regionserver, logging to /hbase/bin/../logs/hbase--1-regionserver-2e2b60fb647e.outStarting HBase Stargate Rest API server
starting rest, logging to /hbase/bin/../logs/hbase--rest-2e2b60fb647e.outStarting HBase Thrift API server
starting thrift, logging to /hbase/bin/../logs/hbase--thrift-2e2b60fb647e.outExample Usage:
create 'table1', 'columnfamily1'
put 'table1', 'row1', 'columnfamily1:column1', 'value1'
get 'table1', 'row1'
Now starting HBase Shell...
2018-07-12 13:30:15,748 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.3.1, r930b9a55528fe45d8edce7af42fef2d35e77677a, Thu Apr 6 19:36:54 PDT 2017hbase(main):001:0>
hbase(main):002:0*
hbase(main):003:0*
hbase(main):004:0*
hbase(main):005:0*
hbase(main):006:0* quit
映射端口就可以使用web UI来查看状态
sudo docker run -ti -p 16010:16010 -p 9095:9095 -p 8085:8085 --name hase_my -d harisekhon/hbase
hbase-docker 要自己配好hosts http://hbase-docker:16010/master-status
The region servers status pages are linked from the above page.
Thrift UI
http://hbase-docker:9095/thrift.jsp
REST server UI
http://hbase-docker:8085/rest.jsp
(Embedded) Zookeeper status
http://hbase-docker:16010/zk.jsp