docs(server): add Docker with HBase validation runbook#3041
Conversation
…pache#3030) - improved `docker/hbase/README.md`. Added sections for "Standalone HugeGraph" and "Docker HugeGraph" and steps to verify the hbase backend -Used the steps in README.md file to verify the issue apache#3030. It its unreproducible in latest master branch.
There was a problem hiding this comment.
Pull request overview
Rewrites the docker/hbase/ HBase backend testing guide into a shorter dual-path runbook (standalone HugeGraph against Dockerized HBase, vs. fully containerized HugeGraph+HBase on a shared Docker network), and makes the HBase container's advertised hostname configurable so the same image works in both topologies. Originated from investigating issue #3030, which could not be reproduced on master; the underlying server change set is doc/operational only.
Changes:
- Restructures
docker/hbase/README.mdaround two explicit setup paths, adds REST traverser verification steps (/traversers/kout,/traversers/rays) and a troubleshooting table. - Adds
HBASE_HOSTNAME/HBASE_MASTER_HOSTNAME/HBASE_REGIONSERVER_HOSTNAMEenv wiring indocker-compose.hbase.ymlwith ahbasefallback. - Adds a
set_xml_property_valuehelper inentrypoint.shthat rewriteshbase.master.hostnameandhbase.regionserver.hostnameinhbase-site.xmlat container start.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| docker/hbase/README.md | Replaces the long testing guide with a two-path runbook and adds REST verification + troubleshooting table. |
| docker/hbase/docker-compose.hbase.yml | Makes container hostname configurable and forwards HBase hostname env vars into the container. |
| docker/hbase/entrypoint.sh | Patches hbase-site.xml master/regionserver hostnames at runtime from env vars before starting daemons. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
imbajin
left a comment
There was a problem hiding this comment.
Found one runbook blocker in the standalone HugeGraph + Docker HBase path.
…pache#3030) -Addressed review comments.
…pache#3030) -Addressed review comments.
…pache#3030) -Addressed review comments by Copilot.
| escape_sed_replacement() { | ||
| printf '%s' "$1" | sed -e 's/[&|]/\\&/g' | ||
| } |
| ## Manual Verification | ||
| <details> | ||
| <summary><b>Option 2: Docker HugeGraph (fully containerized)</b></summary> | ||
|
|
| # 4) One-shot init-store | ||
| docker rm -f hg-server-init >/dev/null 2>&1 || true | ||
| docker run --rm --name hg-server-init \ | ||
| --network "$HBASE_NETWORK" \ | ||
| hugegraph/server:dev \ | ||
| bash -lc ' | ||
| set -euo pipefail | ||
| CONF=/hugegraph-server/conf/graphs/hugegraph.properties | ||
| perl -pi -e "s/^backend=.*/backend=hbase/" "$CONF" | ||
| perl -pi -e "s/^serializer=.*/serializer=hbase/" "$CONF" | ||
| perl -pi -e "s/^#(hbase\.hosts=.*)/\$1/" "$CONF" | ||
| perl -pi -e "s/^#(hbase\.port=.*)/\$1/" "$CONF" | ||
| perl -pi -e "s/^#(hbase\.znode_parent=.*)/\$1/" "$CONF" | ||
| perl -pi -e "s/^hbase\.hosts=.*/hbase.hosts=hbase/" "$CONF" | ||
| perl -pi -e "s/^hbase\.port=.*/hbase.port=2181/" "$CONF" | ||
| perl -pi -e "s|^hbase\.znode_parent=.*|hbase.znode_parent=/hbase|" "$CONF" | ||
| ./bin/init-store.sh | ||
| ' |
| # Initialize HBase tables (enter password 'pa' when prompted) | ||
| printf 'pa\npa\n' | "$SERVER_DIR/bin/init-store.sh" | ||
| Wipe any conflicting test records and data schema. | ||
|
|
…pache#3030) -Addressed review comments by Copilot.
imbajin
left a comment
There was a problem hiding this comment.
Blocking: no. Summary: The cleanup command has a shell typo that prevents returning to the repository root. Evidence: bash -lc 'ROOT_DIR=$(mktemp -d); cd /; cd $"ROOT_DIR"' returns cd: ROOT_DIR: No such file or directory.
…pache#3030) -Addressed review comments by imbajin -Fixed other minor issues.
Hi @imbajin , |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #3041 +/- ##
============================================
- Coverage 35.96% 0.07% -35.89%
+ Complexity 338 22 -316
============================================
Files 803 781 -22
Lines 68089 65574 -2515
Branches 8916 8468 -448
============================================
- Hits 24489 51 -24438
- Misses 40976 65521 +24545
+ Partials 2624 2 -2622 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks @imbajin for reviewing and merging this PR. |
Description
While investigating issue #3030, the underlying bug could not be directly reproduced on the current master branch. However, during the investigation, I identified several improvements for docker/hbase/README.md that will be useful for verifying HBase-related issues in the future.
Specifically, this PR splits the local verification process into two clear paths (Standalone vs. Fully Containerized). It also enhances the HBase Docker artifacts by making hbase.master.hostname and hbase.regionserver.hostname fully configurable via environment variables.
Main Changes
1. Documentation Updates (
docker/hbase/README.md)perlscripts to dynamically swap backend/serializer properties (rocksdbhbase) and rewrite host configurations on the fly./traversers/REST APIs (kout,rays) to securely validate graph space persistence.UnknownHostExceptionor port conflicts) directly to their respective resolutions.2. Docker Environments (
docker/hbase/)docker-compose.hbase.yml): Replaced hardcoded hostnames with a configurable environment variable fallback (${HBASE_HOSTNAME:-hbase}).entrypoint.sh): Added aset_xml_property_valuehelper function inside the entrypoint sequence. This cleanly updateshbase.master.hostnameandhbase.regionserver.hostnameconfigurations insidehbase-site.xmlat runtime based on the container environment.Verifying of the issue
Verified the issue as follows
mvn clean package -DskipTests), initializing the store backend (init-store.sh), and running the sequential REST traversal scripts.hugegraph/server:devtarget image and executing the one-shot store initializations inside an isolated container network.hugegraph-serverlogs were entirely clean of the targeted warnings during operation; specifically, no instances of the following log patterns were observed:Does this PR potentially affect the following parts?
Documentation Status
Doc - Done(The primary objective of this PR is introducing the HBase validation runbook docs)