Skip to content

doc(toolchain): sync client with master - #476

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

doc(toolchain): sync client with master#476
imbajin merged 1 commit into
apache:masterfrom
bitflicker64:doc-sync/toolchain-client

Conversation

@bitflicker64

Copy link
Copy Markdown
Contributor

Purpose of the PR

Sync the hugegraph-client docs (en + cn) with hugegraph-toolchain master (3b385c3d).

The client pages had three API names that do not exist on master, and were missing most of the builder surface plus several schema features. The quickstart pages (content/{en,cn}/docs/quickstart/client/hugegraph-client.md) were checked against master too and needed no change: the Maven version 1.7.0 is still the latest release (master's revision 1.8.0 is unreleased), the JDK 11 / Java 8 target note matches .github/workflows/client-ci.yml:31 and pom.xml:112, and both examples still match hugegraph-client/src/main/java/org/apache/hugegraph/example/.

Page What was wrong What changed Source on master
content/{en,cn}/docs/clients/hugegraph-client.md Datatype table listed asUuid(), which does not exist and would not compile Renamed to asUUID() hugegraph-client/src/main/java/org/apache/hugegraph/structure/schema/PropertyKey.java:101
content/{en,cn}/docs/clients/hugegraph-client.md Vertex examples used T.label; the id bullets used the literal string "T.id", which never matches the lookup key Changed to T.LABEL and T.ID, and noted that T.LABEL is the constant "label" hugegraph-client/src/main/java/org/apache/hugegraph/structure/constant/T.java:22, GraphManager.java:72
content/{en,cn}/docs/clients/hugegraph-client.md GraphSpace table listed getGraphNumber(), which does not exist Renamed to getGraphNumberUsed(), and added the other property and quota accessors hugegraph-client/src/main/java/org/apache/hugegraph/structure/space/GraphSpace.java:280
content/{en,cn}/docs/clients/hugegraph-client.md Only configTimeout and configUser were shown, the other builder options were undocumented Added section 1.1 with every option and its default, including the pool, idle-time, SSL, token, connect/read timeout and OkHttp callback options hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClientBuilder.java:28, :92
content/{en,cn}/docs/clients/hugegraph-client.md Page implied schema, graph and gremlin were the only entries Added section 1.2 listing the manager entries, which ones need a graph, and the supports* capability checks hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java:158, :225
content/{en,cn}/docs/clients/hugegraph-client.md No mention of the server API version handshake Noted that build() rejects a server API version outside [0.38, 0.81) hugegraph-client/src/main/java/org/apache/hugegraph/driver/HugeClient.java:218
content/{en,cn}/docs/clients/hugegraph-client.md PropertyKey section omitted aggregateType Added the calcSum/calcMax/calcMin/calcOld table and the aggregateType(...) setter, default none hugegraph-client/src/main/java/org/apache/hugegraph/structure/schema/PropertyKey.java:123, structure/constant/AggregateType.java:25
content/{en,cn}/docs/clients/hugegraph-client.md PropertyKey section omitted writeType Added the OLTP / OLAP_COMMON / OLAP_SECONDARY / OLAP_RANGE table, default oltp hugegraph-client/src/main/java/org/apache/hugegraph/structure/schema/PropertyKey.java:125, structure/constant/WriteType.java:26
content/{en,cn}/docs/clients/hugegraph-client.md idStrategy table was missing the UUID strategy Added useCustomizeUuidId / CUSTOMIZE_UUID to the table and to the create examples hugegraph-client/src/main/java/org/apache/hugegraph/structure/schema/VertexLabel.java:109, structure/constant/IdStrategy.java:32
content/{en,cn}/docs/clients/hugegraph-client.md VertexLabel and EdgeLabel ttl were undocumented Added ttl and ttlStartTime for both, default 0, plus the getters in the query examples hugegraph-client/src/main/java/org/apache/hugegraph/structure/schema/VertexLabel.java:117, EdgeLabel.java:199
content/{en,cn}/docs/clients/hugegraph-client.md EdgeLabel said only one source and one target label were allowed Documented link(...), which can be called repeatedly, that sourceLabel(...) is rejected afterwards, and that the single-pair getters only work on a one-pair label hugegraph-client/src/main/java/org/apache/hugegraph/structure/schema/EdgeLabel.java:175, :272, :104
content/{en,cn}/docs/clients/hugegraph-client.md Edge label types were undocumented Added the asBase() / withBase(...) / asGeneral() table hugegraph-client/src/main/java/org/apache/hugegraph/structure/schema/EdgeLabel.java:177, structure/constant/EdgeLabelType.java:24
content/{en,cn}/docs/clients/hugegraph-client.md GraphSpace summary omitted the default-role methods Added setDefaultRole, checkDefaultRole and deleteDefaultRole, noting the optional graph argument hugegraph-client/src/main/java/org/apache/hugegraph/driver/GraphSpaceManager.java:71
content/{en,cn}/docs/clients/hugegraph-client.md No minimum server version was given for GraphSpaces Noted that GraphSpaces need server core 1.7.0 or later, otherwise supportsGraphSpace() is false hugegraph-client/src/main/java/org/apache/hugegraph/driver/ServerCompatibility.java:31

The primaryKeys / id-strategy constraint matrix was left as it is, since that combination is validated server side and cannot be confirmed from the toolchain repo. A sentence was added saying what the client itself checks, which is only that the id strategy is not set twice.

Correct the Java client API names that no longer exist (asUUID, T.LABEL,
T.ID, getGraphNumberUsed) and document the parts of the client the page
never covered: the full set of HugeClient builder options with their
defaults, the manager entry points beyond schema/graph/gremlin, property
key aggregate and write types, the customize-uuid id strategy, schema
label ttl, multi-pair edge links and edge label types, and the GraphSpace
default-role and quota methods. Applied to both the en and cn pages.

@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 73bccea 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