Apache HBase is a distributed, scalable, big data store. With Apache HBase, you can randomly access your big data, which support realtime read/write. You can get more information about Apache HBase from the reference list [3]. This article introduces how to setup a standalone HBase database with Dockerbase supported.
Steps:
1. Install Docker: Install the latest version of Docker on Ubuntu:
1 2 |
|
For Microsoft Windows or Mac OS, there is a tool named boot2docker
[1] need to be installed to provide a terminal to run the following commands. You can also get more information about other platform you are on from reference [2].
2. Clone the Dockerbase HBase image from the public Docker hub registry [4]:
1
|
|
3. After pulling the image, the Dockerbase image will run automatically into the docker container (docker container just like a lightweight virtual machine), then you can run the following commands to start Apache HBase, and then launch the shell to run the HBase commands:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
|
From the above commands, we list the tables in database, then create
a table named ‘test’. We put
some data into the table, then get
it out with the get
command. Before we drop
the table, we have to disable
it. The last step is to quit the Apache HBase shell.
You can find more Apache HBase shell commands from reference list [4] to practice in this Dockerbase image. Enjoy!
References:
- http://boot2docker.io/
- https://docs.docker.com/installation/
- http://hbase.apache.org/
- https://registry.hub.docker.com/u/dockerbase/devbase-hbase/
- http://wiki.apache.org/hadoop/Hbase/Shell
Written with StackEdit.