Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker容器—HBase安装 #38

Open
johnnian opened this issue Oct 10, 2017 · 3 comments

Comments

3 participants
@johnnian
Copy link
Owner

commented Oct 10, 2017

最近在学习HBase,为了省事,直接使用Docker镜像进行安装。

参考Github:dajobe/hbase-docker

安装具体步骤

# 下载 Hbase 镜像
$ docker pull dajobe/hbase

# 进入任意目录,根据镜像创建容器
$ mkdir data  
$ docker run --name=hbase-docker -h hbase-docker -d -v $PWD/data:/data dajobe/hbase

# 进入容器进行操作
$ docker ps -l
CONTAINER ID        IMAGE               COMMAND               CREATED             STATUS              PORTS                                                         NAMES
4acfa1bd1092        dajobe/hbase        "/opt/hbase-server"   9 minutes ago       Up 9 minutes        2181/tcp, 8080/tcp, 8085/tcp, 9090/tcp, 9095/tcp, 16010/tcp   hbase-docker

$ docker exec -it 4acfa1bd1092 hbash shell

hbase dec 4acfa1bd1092 hbase shell
2017-10-10 01:55:10,594 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.2.4, r67592f3d062743907f8c5ae00dbbe1ae4f69e5af, Tue Oct 25 18:10:20 CDT 2016

hbase(main):001:0> status
1 active master, 0 backup masters, 1 servers, 0 dead, 2.0000 average load

HBase Shell 命令

@johnnian johnnian changed the title Docker容器——HBase安装 Docker容器—HBase安装 Oct 10, 2017

@johnnian johnnian added this to Docker in Linux & Docker Jan 19, 2018

@liupeng328

This comment has been minimized.

Copy link

commented Apr 8, 2018

怎么搭建一个集群??

@hm-dusk

This comment has been minimized.

Copy link

commented Oct 24, 2018

同问,怎么搭建一个HBase集群呢

@johnnian

This comment has been minimized.

Copy link
Owner Author

commented Oct 24, 2018

@liupeng328 @hm-dusk 直接去找现成的Docker容器,看看有没有?我只是为了节省测试时间,简单用Docker搭建了一个HBase单点服务,哈哈~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.