Repository navigation
docs: require Java 17 starting with 1.8.0 #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
b390241
6af1c81
55b4e34
0a6a690
f8450f0
9ff24e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,17 +35,49 @@ flowchart TD | |
|
|
||
| ## 2 Dependency for Building/Running | ||
|
|
||
| ### 2.1 Install Java 11 (JDK 11) | ||
| <span id="21-install-java-11-jdk-11"></span> | ||
|
|
||
| The `hugegraph-server` module in HugeGraph 1.7.0 is compiled with Java 11. Running and building it from source require Java 11 or later. | ||
| ### 2.1 Install Java 17 (JDK 17) | ||
|
|
||
| **Before continuing, run `java -version` to confirm your JDK version.** | ||
|
|
||
| > Java 8 is no longer supported starting from 1.7.0. `bin/hugegraph-server.sh` refuses to start on anything older than Java 11. | ||
| Starting with HugeGraph 1.8.0, use **Java 17**; **1.7.0 is the last release supporting Java 11**. | ||
|
imbajin marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: This sets the 1.8.0 boundary, but pages outside this PR still give Java 11 as the requirement for master and the next release. Evidence at this head: Please update those pages here or in a linked follow-up, scoping Java 11 to 1.7.0 and earlier. |
||
| Build all modules with **JDK 17 and Maven 3.6.3 or later**, and run Server, PD and Store with **JDK 17**. | ||
|
imbajin marked this conversation as resolved.
|
||
| Server security check (`-s true`) requires Java 17 to 23 and a readable `conf/java-security.properties`; | ||
| on Java 24 or later, start Server with `-s false` (JDK 24+ dropped Security Manager via JEP 486). | ||
|
|
||
| > The security check is on by default and installs `HugeSecurityManager`, which needs Java 11 to 23. JDK 24 removed the Security Manager ([JEP 486](https://openjdk.org/jeps/486)), so on Java 24 or later you must start the service with the check disabled: `bin/start-hugegraph.sh -s false`. | ||
| **Before continuing, run `java -version` to confirm your JDK version.** | ||
|
|
||
| > Building from source also needs Maven 3.5.0 or later. | ||
| > [!NOTE] | ||
| > **TinkerPop compatibility** | ||
| > | ||
| > HugeGraph 1.8.0 uses TinkerPop 3.8.1 and Groovy 4.0.25. Use the Gremlin configuration files bundled with Server. | ||
| > Serializer classes move from `org.apache.tinkerpop.gremlin.driver.ser` to `org.apache.tinkerpop.gremlin.util.ser`; | ||
| > retain the supplied HugeGraph registries. Gremlin Groovy remains the default engine. | ||
| > Check application scripts against the TinkerPop 3.5.1 to 3.8.1 upgrade interval; this upgrade does not switch remote requests to GremlinLang. | ||
| > | ||
| > `supportsUniformListValues()` now returns `false` for vertex and edge properties, so clients that inspect `Graph.Features` must adjust that capability check. | ||
| > Schema-defined `valueList()`/`LIST` properties remain supported; this flag change alone does not require rewriting existing list data. | ||
| > | ||
| > A mid-traversal scan retains its input multiplicity: with three vertices, `g.V().V().count()` returns `9L`. | ||
| > `P.typeOf()` runs as a local filter, including in negated or combined predicates; it does not use backend indexes on its own. | ||
| > | ||
| > The bundled Driver and Console configurations use GraphBinary V1: schema results are standard maps and Blob values are binary, | ||
| > including inside returned graph elements. Default HTTP JSON with untyped GraphSON V1 preserves the legacy Tree `key`/`value` array, with scalar or element | ||
| > keys. | ||
| > Optional results carry their value or null when empty; File results keep the map shape `{"file": "name"}` with the file name, including in nested results. | ||
| > HugeGraph enums return their names; `graph.schema()` returns a map with property key, vertex label, edge label and index label lists. | ||
| > Typed GraphSON is available only for supported simple values and IDs, not as a replacement for untyped serialization of every graph or schema object. | ||
| > Typed GraphSON V1 is disabled because class-name deserialization can construct Java objects before authentication; typed V2/V3 remain available. | ||
|
imbajin marked this conversation as resolved.
|
||
| > The bundled Cypher predicate imports use the compatible factories, including when replaying the Gremlin translation returned by `EXPLAIN`. | ||
| > Named `GValue` predicates retain bindings when reused or cloned; named `limit()`/`range()` bounds count like literal bounds. | ||
| > Local mixed ID collections preserve typed string, number and UUID matches; all-string collections retain standard string-ID comparisons. | ||
| > Local edge ID filters accept mixed serialized strings and native edge IDs with consistent membership and count results. | ||
| > Jackson JSON and YAML modules use one compatible version, including parsing decimal-valued Kubernetes kubeconfig extensions. | ||
| > Count filtering keeps the complete count if any predicate branch has no proven safe truncation bound, including unsupported negated collections and custom | ||
| > predicates. | ||
| > DATE schema properties accept `OffsetDateTime` for writes and indexed equality/range queries, normalized by instant to milliseconds; | ||
| > sub-millisecond precision is truncated, and existing DATE data needs no migration. | ||
| > See the [server runtime documentation](https://github.com/apache/hugegraph/blob/master/docs/server-runtime.md) | ||
| > for client configuration and verification details. | ||
|
|
||
| ## 3 Deploy | ||
|
|
||
|
|
@@ -159,13 +191,13 @@ A successful build logs: | |
| [INFO] BUILD SUCCESS | ||
| ``` | ||
|
|
||
| The build creates an aggregate master archive under repository-root `target/` (the current source version property is 1.7.0): | ||
| The build creates an aggregate master archive under repository-root `target/` (the current source version property is 1.8.0): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: This now says the source version is 1.8.0, but the version-scope note at line 17 of the same page still says a master build is not an ASF release "even if its version number matches 1.7.0". With master at Please reword line 17 to not tie the master build to 1.7.0, for example "even if its version number matches a release". CN line 17 ("即使包内版本号相同也不代表与 1.7.0 发布包相同") needs the same change. |
||
|
|
||
| ```text | ||
| target/apache-hugegraph-1.7.0.tar.gz | ||
| target/apache-hugegraph-1.8.0.tar.gz | ||
| ``` | ||
|
|
||
| The filename version comes from source `revision`; it does not make the build an ASF release artifact. The build also creates repository-root `apache-hugegraph-1.7.0/`, containing a Server directory named by that module's `final.name`, currently `apache-hugegraph-server-1.7.0`. If retaining only the archive, first run `tar zxf target/apache-hugegraph-1.7.0.tar.gz`, then enter the Server directory. | ||
| The filename version comes from source `revision`; it does not make the build an ASF release artifact. The build also creates repository-root `apache-hugegraph-1.8.0/`, containing a Server directory named by that module's `final.name`, currently `apache-hugegraph-server-1.8.0`. If retaining only the archive, first run `tar zxf target/apache-hugegraph-1.8.0.tar.gz`, then enter the Server directory. | ||
|
|
||
| Default builds bundle `rocksdb`, `hbase`, and `hstore` modules, listed in `backends` within `backend.properties` in the `hugegraph-dist` JAR. For a RocksDB-only distribution, add `-Drocksdb-only`: | ||
|
|
||
|
|
@@ -525,10 +557,10 @@ This indicates the successful creation of the sample graph. | |
| | Option | Values | Default | Purpose | | ||
| |---|---|---|---| | ||
| | `-d` | `true`, `false` | `true` | Daemon mode. With `-d false` the script stays in the foreground and forwards `SIGTERM`/`SIGINT` to the server. | | ||
| | `-g` | `zgc` or `ZGC` | omit for G1GC | Garbage collector to use. Only ZGC is accepted, any other value aborts the startup. ZGC needs Java 11 or later. | | ||
| | `-g` | `g1`, `G1`, `zgc`, `ZGC` | JVM default | Garbage collector to use (`g1`/`G1` sets `-XX:+UseG1GC`; `zgc`/`ZGC` sets `-XX:+UseZGC`). Omitting `-g` uses the JVM default collector. | | ||
| | `-m` | `true`, `false` | `false` | Install the cron-based monitor task (`bin/start-monitor.sh`). For VM and bare-metal deployments only. | | ||
| | `-p` | `true`, `false` | `false` | Preload the sample graph, as in 5.1.4. | | ||
| | `-s` | `true`, `false` | `true` | Run with the security check (`HugeSecurityManager`) enabled. It requires Java 11 to 23 and a readable `conf/java-security.properties`. | | ||
| | `-s` | `true`, `false` | `true` | Enable `HugeSecurityManager`; requires Java 17 to 23 and readable `conf/java-security.properties`. On Java 24+, start with `-s false`. | | ||
| | `-j` | JVM options | empty | Extra JVM options appended to the server command line. | | ||
| | `-t` | seconds | `30` | How long to wait for the service to answer before reporting a failed startup. | | ||
| | `-y` | `true`, `false` | `false` | Enable the OpenTelemetry agent for traces. | | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important: This line says Java
≥ 17is "enforced by the build", but the build accepts only JDK 17, so a reader on JDK 21 who follows section 3.2 here fails before compiling. This line came from the fix for the earlier PD/HStore thread.Evidence, apache/hugegraph master at 06f90a9f0: root
pom.xmlsetsjava.supported.version.rangeto[17,18)("Java 17 is the only qualified build/runtime release") and the enforcer applies it.mvn -N validatethere fails on JDK 26 with "not in the allowed range [17,18)" and passes on JDK 17. Only the start scripts accept newer runtimes. ENhugegraph-pd.mdline 28 (beside its own section 3.2), CNhugegraph-hstore.mdline 25 and CNhugegraph-pd.mdline 28 say the same.Please split build and run on all four lines, for example "Java 17 for HugeGraph 1.8.0+ (the Maven build accepts only JDK 17; the start script rejects anything older; 1.7.0 is the last release supporting Java 11)".