Skip to content

anmolnar/hbase-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HBase Docker Setup

Based on @vinayakphegde 's original Docker images for HBase and extended to run two clusters side-by-side mainly for HBase Read Replica Cluster feature testing. There are two "conf" folders for the individual cluster with common root directories (/data-store/hbase is mounted from local filesystem), but separated WAL directories and separate ZooKeeper databases. The "hbase" cluster is the Active Cluster while the "hbase2" is the Read Replica Cluster which is set up with global read-only mode enabled.

Build Docker Images

  1. Ensure the HBase source code directory is located within the current directory (alongside the Dockerfile and other required files). The directory should contain the HBase source code needed to build the image. The structure should look like this:
    .
    ├── conf1/
    ├── conf2/
    ├── Dockerfile
    ├── docker-compose.yml
    ├── build-images.sh
    ├── hbase/
    │   └── [HBase source files]
    └── ...
  2. Create .env with the correct details.
    HBASE_IMAGE=vhegde/hbase-docker
    HBASE_CONF_DIR=/opt/hbase/conf
  3. Modify the paths in your docker-compose.yml file to be compatible with your filesystem. For example, change:
    volumes:
      - /Users/andor/tmp/data-store/hbase:/data-store/hbase
    
    To:
    volumes:
      - /Users/<YOUR-USERNAME>/tmp/data-store/hbase:/data-store/hbase
    
  4. Make the build script executable:
    chmod +x build-images.sh
  5. Build the images:
    ./build-images.sh

Run the containers

Start "hbase" cluster:

docker-compose up -d hbase

Start "hbase2" cluster:

docker-compose up -d hbase2

Exec shell inside container:

docker exec -it <container_id> /bin/bash

Shutdown containers:

docker-compose down

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 54.6%
  • Shell 31.8%
  • Python 13.6%