Skip to content

Development environment

Documentation home · Test guide

The repository's Docker Compose project contains ZooKeeper, one HBase Master, three RegionServers, and a Python development container. Use this project's containers, not containers from another repository.

Start or reuse the project environment

From the repository root:

docker compose up -d
docker compose ps

The dev service is named hbase_dev; the checkout is mounted at /workspace. Its HBASE_ZK is hbase-zk:2181. The environment uses Python 3.11 and HBase 2.6.1.

For an interactive shell:

docker compose exec dev bash

Inside it, use the checkout and editable installation:

cd /workspace
python -m pip install -e .
python -m pip install -r requirements.txt

A separate venv inside this disposable dev container is optional. Normal customers do not need Docker or a source checkout; they can install with python -m pip install hbase-driver.

Run examples and tests

The complete example is a copyable Markdown script; save it locally before running it. This documentation-only publication does not update the repository's legacy Python example scripts.

docker compose exec -T dev python -m pytest test/test_batch_operations.py -v

For the runner's cluster readiness checks and full test suite on existing containers:

./scripts/run_tests_3node.sh --no-start

Without --no-start, the runner rebuilds/restarts the project environment. This is useful for a fresh setup but disrupts already-running containers. The older run_tests_docker.sh is a separate legacy workflow; prefer the three-RegionServer setup for current verification.

Network addresses

Caller ZooKeeper Notes
dev container hbase-zk:2181 Resolves the advertised HBase hostnames
Host Python 127.0.0.1:2181 ZooKeeper alone is insufficient; HBase hostnames must also resolve/reach correctly

View the local Master UI at localhost:16010. Host-published RegionServer ports are 16020/16021/16022; inside the Docker network each RegionServer uses 16020. Do not replace discovered addresses blindly with localhost.

Stop without deleting data

docker compose stop

This stops the project containers while preserving them and the shared HBase volume. Avoid docker compose down -v and the runner's --down flag unless you intentionally want to remove stored development data.

The shared local volume is a test convenience, not a production storage architecture. Document tests create uniquely named scratch tables and delete only those they own.