Skip to content

doc(server): sync dist with master - #489

Merged
imbajin merged 1 commit into
apache:masterfrom
bitflicker64:doc-sync/server-dist
Sep 6, 2026
Merged

doc(server): sync dist with master#489
imbajin merged 1 commit into
apache:masterfrom
bitflicker64:doc-sync/server-dist

Conversation

@bitflicker64

Copy link
Copy Markdown
Contributor

Syncs the hugegraph-dist surface (startup scripts, conf/ templates, Docker images and compose topologies, IDEA run configs) with apache/hugegraph master at 36811483a. Both content/en/docs/ and content/cn/docs/ are updated.

page what was wrong what changed source (file:line on master)
quickstart/hugegraph/hugegraph-server.md HStore setup told users to set task.scheduler_type=distributed (twice) Removed the key from both snippets, added a note that the scheduler is picked from the backend and that the key is ignored with a warning hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/StandardHugeGraph.java:230
quickstart/hugegraph/hugegraph-server.md "Two compose files are available", docker-compose.dev.yml described as a single-node dev build Table of all four files with their real services; .dev.yml documented as the source-build overlay for the minimal HStore topology docker/README.md:13, docker/README.md:278, docker/docker-compose.dev.yml:18
quickstart/hugegraph/hugegraph-server.md Compose auth described as "add PASSWORD=xxx to the compose file" Compose reads HUGEGRAPH_ADMIN_PASSWORD and HUGEGRAPH_AUTH_TOKEN_SECRET (usually from docker/.env); docker run still uses -e PASSWORD docker/docker-compose.yml:34, docker/README.md:24
quickstart/hugegraph/hugegraph-server.md Preload script mounted at /hugegraph/scripts/example.groovy Corrected to /hugegraph-server/scripts/example.groovy (image WORKDIR) hugegraph-server/Dockerfile:47, hugegraph-server/hugegraph-dist/docker/README.md:53
quickstart/hugegraph/hugegraph-server.md curl http://localhost:8081/graphs given as the readiness check Corrected to /graphspaces/DEFAULT/graphs; there is no bare /graphs resource hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/profile/GraphsAPI.java:72
quickstart/hugegraph/hugegraph-server.md Sample output read Starting HugeGraphServer... Corrected to Starting HugeGraphServer in daemon mode... plus the Started [pid N] line hugegraph-server/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh:103, bin/util.sh:381
quickstart/hugegraph/hugegraph-server.md Only -p true was documented; no reference for the other startup flags New 5.1.5 section with all eight start-hugegraph.sh options and their defaults, plus stop-hugegraph.sh -m; notes that -g accepts only ZGC bin/start-hugegraph.sh:50, bin/hugegraph-server.sh:137, bin/stop-hugegraph.sh:20
quickstart/hugegraph/hugegraph-server.md Java requirement stated as "11 or later" with no upper bound Added that the default security check needs Java 11 to 23 (JDK 24 removed the Security Manager, use -s false), that the script rejects anything below 11, and that the build needs Maven 3.5.0+ bin/hugegraph-server.sh:66, bin/hugegraph-server.sh:70, pom.xml:241
quickstart/hugegraph/hugegraph-server.md Source build had no mention of the backend selection Documented -Drocksdb-only and the default rocksdb, hbase, hstore backend set hugegraph-server/hugegraph-dist/pom.xml:38, hugegraph-server/hugegraph-dist/pom.xml:294
quickstart/hugegraph/hugegraph-server.md HStore section listed only two Server env vars; init-store step and graph.load_from_local_config were inconsistent between en and cn Full Server env block from the HA compose file, the hstore.properties.template pointer, the init_store.enabled behaviour, and graph.load_from_local_config=true in the en page too docker/docker-compose-3pd-3store-3server.yml:62, hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java:86, ServerOptions.java:355
config/config-guide.md gremlin-server.yaml snippet was missing GlobalMasterInfo and had DateUtil in the wrong position Snippet now matches the shipped file line for line hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml:43
config/config-guide.md #gremlinserver.url=http://127.0.0.1:8182 did not match the template Matches the template (127.0.0.1:8182), with a note that the scheme is prepended when missing conf/rest-server.properties:6, ServerOptions.java:117
config/config-guide.md hugegraph.properties snippet was missing vertex.cache_type, edge.cache_type, vertex.default_label, serializer.buffer_max_capacity, the HBase partition keys, the raft deprecation note and the whole memory block; carried a stale ikanalyzer download note Snippet now matches conf/graphs/hugegraph.properties key by key conf/graphs/hugegraph.properties:1
config/config-guide.md Option list omitted the newly uncommented cache and task keys; RocksDB path defaults undocumented Added vertex.cache_type/edge.cache_type (l1/l2, default l2), the task keys and analyzer list, and the rocksdb-data/data and rocksdb-data/wal defaults CoreOptions.java:540, CoreOptions.java:603, hugegraph-rocksdb/.../RocksDBOptions.java:58
config/config-guide.md "HugeGraphServer does not support distributed deployment"; GremlinServer default given as localhost:8182 Removed the stale claim, defaults corrected to 127.0.0.1:8182 conf/gremlin-server.yaml:18, ServerOptions.java:117
config/config-guide.md Multi-graph startup output showed a /graphspaces/DEFAULT/graphs probe URL The script probes $REST_SERVER_URL/graphs and prints "in daemon mode" bin/start-hugegraph.sh:113
guides/hugegraph-docker-cluster.md "Three compose files"; .dev.yml described as a single-node dev build; no .env / auth section; HStore and Hubble topologies missing Four-file table, image naming, a new Authentication Environment section, a Minimal HStore quickstart, and the dev overlay usage docker/README.md:13, docker/README.md:24, docker/docker-compose-hstore.yml:1, docker/docker-compose.dev.yml:18
guides/hugegraph-docker-cluster.md PD alias list omitted PD_INITIAL_STORE_LIST Added, plus the mapping rule and the exit-code-2 behaviour for missing required vars hugegraph-pd/hg-pd-dist/docker/docker-entrypoint.sh:47, :22
guides/hugegraph-docker-cluster.md Server table listed 4 vars, two of them marked required Full table of 16 Server vars with defaults and target keys, the accepted HG_SERVER_INIT_STORE_ENABLED spellings, the init marker, and a new Compose Variables table hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh:90, bin/wait-storage.sh:38, bin/wait-partition.sh:22, docker/docker-compose.yml:29
guides/hugegraph-docker-cluster.md Port table missed the Store raft ports and Hubble, and did not distinguish host from container ports Added container ports, store raft ports, Hubble 8088, and what each topology publishes docker/docker-compose-3pd-3store-3server.yml:110, :162, :236
guides/hugegraph-docker-cluster.md Health-check table used non-existent image names (hugegraph/hugegraph-pd, hugegraph/hugegraph-store, hugegraph/hugegraph-hstore) Corrected to hugegraph/pd, hugegraph/store, hugegraph/server, plus a note that Compose defines its own checks docker/README.md:263, docker/docker-compose-hstore.yml:30
guides/hugegraph-docker-cluster.md "use docker logs" applied uniformly to all images Noted that only the standalone image sets STDOUT_MODE=true, so HStore Server logs live in logs/hugegraph-server.log; added the down vs down -v data note hugegraph-server/Dockerfile:45, hugegraph-server/Dockerfile-hstore:46, docker/README.md:256
clients/gremlin-console.md :> hugegraph.traversal().V() and graph = hugegraph; cannot resolve, the Server binds graphs under a graphspace-qualified name Documented the DEFAULT-hugegraph / __g_DEFAULT-hugegraph bindings and replaced the examples with the aliased driver flow hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/auth/ContextGremlinServer.java:49, :134, HugeFactory.java:85, hugegraph-dist/src/assembly/travis/run-gremlin-console-smoke-test.sh:62
clients/gremlin-console.md No mention of connecting to an auth-enabled Server, or of the sibling driver config files Added the username/password keys and a pointer to remote-objects.yaml and gremlin-driver-settings.yaml run-gremlin-console-smoke-test.sh:55, conf/remote-objects.yaml:17, conf/gremlin-driver-settings.yaml:17
contribution-guidelines/hugegraph-server-idea-setup.md Copy command and Log4j2 path used hugegraph-dist/..., which does not exist at the repo root Corrected to hugegraph-server/hugegraph-dist/... hugegraph-server/hugegraph-dist/src/assembly/static/conf, hugegraph-server/hugegraph-dist/src/main/resources/log4j2.xml
contribution-guidelines/hugegraph-server-idea-setup.md preload-topling.sh and the ToplingDB env vars were presented as ordinary steps, but nothing ToplingDB-related exists in the repo Marked as applying only to a build that includes ToplingDB no topling match anywhere under apache/hugegraph master
contribution-guidelines/hugegraph-server-idea-setup.md Line-anchored links to init-store.sh#L52 and hugegraph-server.sh#L124 pointed at the wrong lines; the relationship to the shipped entry point was unexplained Anchors moved to #L49 and #L132, and added that the script actually launches HugeGraphServerBootstrap around HugeGraphServer bin/init-store.sh:49, bin/hugegraph-server.sh:132, bin/hugegraph-server.sh:263

Align the server deploy, config template, Docker cluster, Gremlin Console
and IDEA setup pages with hugegraph master. Drop the deprecated
task.scheduler_type key, correct the compose file inventory and the
env-var reference against docker-entrypoint.sh and the compose files,
match the conf/ template snippets key by key, fix the container script
mount path and the graphs endpoint, and document the startup script
flags, the security-check Java range and the rocksdb-only build.

@bitflicker64 bitflicker64 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: no. Summary: I re-derived the claims in this PR against apache/hugegraph at 36811483a and nearly all of them hold: the gremlin-server.yaml and hugegraph.properties snippets now match the shipped files line for line, and the eight start-hugegraph.sh options, the Java 11 to 23 security window, -Drocksdb-only, the Maven 3.5.0 floor, the four compose topologies, the PD/Store/Server env tables, the port and health-check tables, the #L49 and #L132 anchors and the HugeGraphServerBootstrap note all check out. Four notes below, one on a table row that is wrong as written and three minor. Evidence: static reading of the named scripts, Dockerfiles, compose files, conf templates and Java options classes at 36811483a, plus an en/cn parity pass over all ten changed files.

| Variable | Default | Purpose |
|----------|---------|---------|
| `HUGEGRAPH_VERSION` | `latest` | Image tag for Server, PD, and Store |
| `HUGEGRAPH_PULL_POLICY` | `missing` | `pull_policy` for those images, use `never` to keep locally built ones |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ HUGEGRAPH_PULL_POLICY is honoured by only two of the four compose files, so "use never to keep locally built ones" is wrong for the other two. At 36811483a, docker-compose.yml:30 and docker-compose-hstore.yml:31,55,81 expand ${HUGEGRAPH_PULL_POLICY:-missing}, but docker-compose-3pd-3store-3server.yml pins a literal pull_policy: missing on the &pd-common, &store-common and &server-common anchors (lines 36, 48 and 76), and docker-compose.dev.yml pins pull_policy: build (lines 21, 30 and 39). Someone running the HA topology against locally built images is exactly who reads this row, and there the variable does nothing. Suggested cell: pull_policy for those images in docker-compose.yml and docker-compose-hstore.yml, use never to keep locally built ones; the 3pd/3store/3server file pins missing and the dev overlay pins build. Same row at content/cn/docs/guides/hugegraph-docker-cluster.md:186.

> ```bash
> bin/start-hugegraph.sh
> Starting HugeGraphServer...
> Starting HugeGraphServer in daemon mode...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Follow-up rather than a change to this diff, anchored here because the text it concerns (5.1.2 lines 361 to 373) is outside the hunks. The cn page opens 5.1.2 at lines 341 to 349 with a prerequisite the en page has no counterpart for: set graph.load_from_local_config=true in conf/rest-server.properties, plus the note that the source default is false. That default is real (ServerOptions.java:355, read at GraphManager.java:240) and the shipped conf/rest-server.properties omits the key, so an en reader who follows 5.1.2 verbatim starts a Server that loads nothing from conf/graphs, with the sample output right here suggesting otherwise. Since this PR is the sync pass for the page, worth mirroring the cn block into en 5.1.2 above the backend=rocksdb snippet at line 366.


`HG_SERVER_INIT_STORE_ENABLED` accepts only the spellings `HugeConfig` accepts, case-insensitively: `y`, `t`, `yes`, `on`, `true`, `n`, `f`, `no`, `off`, `false`. Anything else, `0` and `1` included, aborts the entrypoint.

The entrypoint writes `docker/init_complete` after a successful initialization and skips re-initialization on later startups, but still re-runs `bin/init-store.sh` so a disabled one revalidates its configuration on every start.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Only the verb is off: the marker is written by the init-store command, not by the entrypoint. InitStore.recordInitComplete() creates it (hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java:167-187, called at :131) and InitStore also returns early when it is present (:94-99); docker-entrypoint.sh:184-185 only computes the path and exports it as HG_SERVER_INIT_COMPLETE_MARKER, under the comment "init-store owns the marker". The rest of the sentence is right, including the entrypoint's own guard at :187. Suggest "bin/init-store.sh records docker/init_complete after a successful initialization" in place of "The entrypoint writes". Same sentence at content/cn/docs/guides/hugegraph-docker-cluster.md:177.

| `HG_SERVER_PD_PEERS` | (none) | `pd.peers` in both `hugegraph.properties` and `rest-server.properties` |
| `HG_SERVER_USE_PD` | `false` | `usePD` in `rest-server.properties` |
| `HG_SERVER_CLUSTER` | `hg-test` | `cluster` in `rest-server.properties` |
| `HG_SERVER_REST_URL` | `http://0.0.0.0:8080` (set in the image) | `restserver.url` |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 "(set in the image)" reads as an image-level environment variable, which this one is not, while the JAVA_OPTS row lower in the same table uses the same phrase for one that is. hugegraph-server/Dockerfile:63 and Dockerfile-hstore:65 sed restserver.url=http://0.0.0.0:8080 straight into conf/rest-server.properties; the ENV blocks (Dockerfile:43-45, Dockerfile-hstore:46-47) carry only JAVA_OPTS, HUGEGRAPH_HOME and, in the standalone image, STDOUT_MODE. HG_SERVER_REST_URL itself is unset, which is why the HA compose sets it per node (lines 204, 213 and 222). Suggested default cell: unset; the image bakes restserver.url=http://0.0.0.0:8080 into conf/rest-server.properties. Same row at content/cn/docs/guides/hugegraph-docker-cluster.md:158.

@imbajin imbajin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

中文部分与源码保持一致且表述清晰,评分 9.2/10,按规则可直接合并。

@imbajin
imbajin merged commit b61447d into apache:master Sep 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants