This is the multi-page printable view of this section. .
HugeGraph (OLTP)
DeepWiki provides real-time updated project documentation with more comprehensive and accurate content, suitable for quickly understanding the latest project information.
GitHub Access: https://github.com/apache/hugegraph
1 - HugeGraph Server Quick Start
1 HugeGraph Server Overview
apache/hugegraph is the main repository for the HugeGraph graph database. Its top-level modules include hugegraph-server, hugegraph-pd, and hugegraph-store. This page describes the hugegraph-server module and the service it runs.
The hugegraph-server module contains hugegraph-core, hugegraph-api, hugegraph-dist, and storage adapters. Core implements the property graph model, transactions, and TinkerPop interfaces. API provides the HTTP service and delegates client requests to Core. Graph data is stored in RocksDB (the default standalone backend), HStore (distributed), or HBase.
â ī¸ Version note: This page follows HugeGraph 1.7.0 through the
masterbranch and covers only RocksDB, HStore, and HBase. For other legacy backends and their configuration, see the HugeGraph 1.5.x documentation.
Naming:
HugeGraphmeans the overall project or main repository,hugegraph-serveris the Server module in that repository, andHugeGraphServeris the Java class for the service process. This page uses “Server service” for a running graph database service.
2 Dependency for Building/Running
2.1 Install Java 11 (JDK 11)
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.
Before continuing, run java -version to confirm your JDK version.
Java 8 is no longer supported starting from 1.7.0.
bin/hugegraph-server.shrefuses to start on anything older than Java 11.
The security check is on by default and installs
HugeSecurityManager, which needs Java 11 to 23. JDK 24 removed the Security Manager (JEP 486), so on Java 24 or later you must start the service with the check disabled:bin/start-hugegraph.sh -s false.
Building from source also needs Maven 3.5.0 or later.
3 Deploy
There are four ways to deploy the Server service:
- Method 1: Use Docker container (Convenient for Test/Dev)
- Method 2: Download the binary tarball
- Method 3: Source code compilation
- Method 4: One-click deployment
Do not expose Gremlin, Cypher, or other query endpoints directly to the public Internet. In production, enable authentication and authorization, restrict network access, and retain audit logs. See the Security Guide for deployment guidance.
3.1 Use Docker container (Convenient for Test/Dev)
You can refer to the Docker deployment guide.
You can use docker run -itd --name=server -p 8080:8080 -e PASSWORD=xxx hugegraph/hugegraph:1.7.0 to quickly start a Server instance using the RocksDB backend.
Optional:
- You can use
docker exec -it server bashto enter the container for troubleshooting or other maintenance operations. - You can use
docker run -itd --name=server -p 8080:8080 -e PRELOAD="true" hugegraph/hugegraph:1.7.0to preload a built-in sample graph at startup. You can verify it through theRESTful API. See 5.1.4 for details. - You can use
-e PASSWORD=xxxto enable authentication mode and set the admin password. See Config Authentication for details.
If you use Docker Desktop, you can set the options as follows:

Note: The Docker Compose files use bridge networking (
hg-net) and work on Linux and Mac (Docker Desktop). For the 3-node distributed cluster on Mac (Docker Desktop), allocate at least 12 GB of memory (Settings â Resources â Memory). On Linux, Docker uses host memory directly.
If you want a single, unified setup for multiple HugeGraph services, you can use docker compose.
Four compose files are available in the docker/ directory:
| Topology | Compose file | Services |
|---|---|---|
| Standalone (start here) | docker-compose.yml | 1 RocksDB Server + 1 Hubble |
| Minimal HStore | docker-compose-hstore.yml | 1 PD + 1 Store + 1 Server + 1 Hubble |
| HA reference | docker-compose-3pd-3store-3server.yml | 3 PD + 3 Store + 3 Server + 1 Hubble |
| Source build override for the minimal HStore topology | docker-compose.dev.yml | (used together with docker-compose-hstore.yml) |
The standalone topology publishes the Server on port 8080 and Hubble on 127.0.0.1:8088. HUGEGRAPH_VERSION selects the Server, PD, and Store image tags; Hubble is selected separately with HUBBLE_IMAGE.
The compose files read the administrator password from HUGEGRAPH_ADMIN_PASSWORD and the JWT secret from HUGEGRAPH_AUTH_TOKEN_SECRET, normally kept in a docker/.env file. A non-empty HUGEGRAPH_ADMIN_PASSWORD turns authentication on, and Hubble detects that mode by itself. With plain docker run, pass -e PASSWORD=xxx instead.
See docker/README.md for the full setup guide.
Note:
HugeGraph Docker images are provided as a convenient way to start HugeGraph quickly, but they are not official ASF distribution artifacts. You can find more details in the ASF Release Distribution Policy.
We recommend using a release tag (such as
1.7.0or1.x.0) for stable deployments. Use thelatesttag only if you want the newest features still under development.
3.2 Download the binary tarball
You could download the binary tarball from the download page of the ASF site like this:
3.3 Source code compilation
Please ensure that the wget/curl commands are installed before compiling the source code
Download HugeGraph source code in either of the following 2 ways (so as the other HugeGraph repos/modules):
- download the stable/release version from the ASF site
- clone the unstable/latest version by GitBox(ASF) or GitHub
Compile and generate tarball
A successful build includes the following line:
After a successful build, the generated distribution is the *hugegraph-*.tar.gz file in the repository root.
The default build bundles the rocksdb, hbase, and hstore backend modules, and records them in the backends option of the backend.properties resource inside the hugegraph-dist jar. To build a smaller distribution that carries RocksDB only, add -Drocksdb-only:
3.4 One-click deployment (Outdated)
HugeGraph-Tools provides a one-click deployment command that downloads, extracts, configures, and starts the Server service and HugeGraph-Hubble. These tools are included in the HugeGraph-Toolchain distribution.
Of course, you should download the tarball of HugeGraph-Toolchain first.
note:
${version}is the version, The latest version can refer to Download Page, or click the link to download directly from the Download page
The general entry script for HugeGraph-Tools is bin/hugegraph, Users can use the help command to view its usage, here only the commands for one-click deployment are introduced.
{hugegraph-version} is the Server service and HugeGraphStudio version; see conf/version-mapping.yaml for supported mappings. {install-path} is the installation directory, while {download-path-prefix} optionally overrides the tarball download location. For example, deploy version 0.6 with bin/hugegraph deploy -v 0.6 -p services.
4 Config
If you need to quickly start HugeGraph just for testing, then you only need to modify a few configuration items (see next section). For detailed configuration introduction, please refer to configuration document and introduction to configuration items
5 Startup
5.1 Use a startup script to startup
Startup is divided into “first startup” and “non-first startup”. On the first startup, you need to initialize the backend database before starting the service.
If the service was stopped manually, or needs to be started again for any other reason, you can usually start it directly because the backend database is persistent.
When HugeGraphServer starts, it connects to the backend storage and checks its version information. If the backend has not been initialized, or if it was initialized with an incompatible version (for example, old-version data), HugeGraphServer will fail to start and report an error.
If you need to access HugeGraphServer externally, modify the restserver.url configuration item in rest-server.properties (the default is http://127.0.0.1:8080) and change it to the machine name or IP address.
Since the configuration (hugegraph.properties) and startup steps required by various backends are slightly different, the following will introduce the configuration and startup of each backend one by one.
Note: Configure Server Authentication before starting HugeGraphServer if you need Auth mode (especially for production or public network environments).
5.1.1 Distributed Storage (HStore)
Distributed storage is a new feature introduced after HugeGraph 1.5.0, which implements distributed data storage and computation based on HugeGraph-PD and HugeGraph-Store components.
To use the distributed storage engine, you need to deploy HugeGraph-PD and HugeGraph-Store first. See HugeGraph-PD Quick Start and HugeGraph-Store Quick Start.
After ensuring that both PD and Store services are started, modify the hugegraph.properties configuration of HugeGraph-Server:
A ready-made template for this backend ships as conf/graphs/hstore.properties.template. Copy it over conf/graphs/hugegraph.properties and adjust pd.peers.
The task scheduler is picked from the backend, so task.scheduler_type does not need to be set. hstore uses the distributed scheduler and every other backend uses the local one. The key is still accepted for upgrade compatibility, but it is ignored and logs a warning.
Then enable PD discovery in rest-server.properties (required for every HugeGraph-Server node):
If configuring multiple HugeGraph-Server nodes, you need to modify the rest-server.properties configuration file for each node, for example:
Node 1 (Master node):
Node 2 (Worker node):
Also, you need to modify the port configuration in gremlin-server.yaml for each node:
Node 1:
Node 2:
Initialize the database:
PD and Store own the metadata and the store for the hstore backend, so init-store skips graphs configured with it. Running it still creates the built-in admin account when authentication is on. In a deployment where the storage side already holds that account, set init_store.enabled=false in rest-server.properties to skip the whole step, which is what the Docker HStore topologies do.
Start the Server:
The startup sequence for using the distributed storage engine is:
- Start HugeGraph-PD
- Start HugeGraph-Store
- Initialize the database (only for the first time)
- Start HugeGraph-Server
Verify that the service is started properly:
The sequence to stop the services should be the reverse of the startup sequence:
- Stop HugeGraph-Server
- Stop HugeGraph-Store
- Stop HugeGraph-PD
Docker Distributed Cluster
Run the full distributed cluster (3 PD + 3 Store + 3 Server) with Docker Compose:
Services communicate via container hostnames on the hg-net bridge network. Configuration is injected via environment variables:
Because this topology sets HG_SERVER_REQUIRE_AUTH_TOKEN_SECRET: "true", the Servers refuse to start when a password is supplied without a shared JWT secret. Put both HUGEGRAPH_ADMIN_PASSWORD and HUGEGRAPH_AUTH_TOKEN_SECRET in docker/.env before starting it. The full variable reference is in the Docker Cluster guide.
Verify the cluster:
To view runtime logs for any container use docker logs <container-name> (e.g. docker logs hg-pd0).
See docker/README.md for the full environment variable reference, port table, and troubleshooting guide.
5.1.2 RocksDB / ToplingDB
RocksDB is an embedded database that does not require manual installation and deployment. GCC version >= 4.3.0 (GLIBCXX_3.4.10) is required. If not, GCC needs to be upgraded in advance
Update hugegraph.properties
Initialize the database (required on the first startup, or a new configuration was manually added under ‘conf/graphs/’)
Start server
ToplingDB (Beta): As a high-performance alternative to RocksDB, please refer to the configuration guide: ToplingDB Quick Start
5.1.3 HBase
users need to install HBase by themselves, requiring version 2.0 or above,download link
Update hugegraph.properties
Initialize the database (required on the first startup, or a new configuration was manually added under ‘conf/graphs/’)
Start server
5.1.4 Create an example graph when startup
Pass the -p true argument when starting the script to enable preload, which creates a sample graph.
And use the RESTful API to request HugeGraphServer and get the following result:
This indicates the successful creation of the sample graph.
5.1.5 Startup script options
bin/start-hugegraph.sh accepts the following options. Every one of them takes a value, so write -d false, not a bare -d.
| 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. |
-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. |
-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. |
bin/stop-hugegraph.sh accepts -m true|false (default true), which controls whether the cron monitor task is removed along with the service.
5.2 Use Docker to startup
In 3.1 Use Docker container, we introduced how to deploy hugegraph-server with Docker. You can also switch storage backends or preload a sample graph by setting the corresponding parameters.
5.2.1 Create an example graph when starting a server
Set the environment variable PRELOAD=true when starting Docker so that sample data is loaded during startup.
Use
docker runUse
docker run -itd --name=server -p 8080:8080 -e PRELOAD=true hugegraph/hugegraph:1.7.0Use
docker-composeCreate a
docker-compose.ymlfile like the following and setPRELOAD=truein the environment.example.groovyis a predefined script used to preload sample data. If needed, you can mount a newexample.groovyscript to change the preload data.Use
docker compose up -dto start the container.
And use the RESTful API to request HugeGraphServer and get the following result:
This indicates that the sample graph was created successfully.
6. Access server
6.1 Service startup status check
Use jps to see a service process
curl request RESTfulAPI
Return 200, which means the server starts normally.
6.2 Request Server
The RESTful API of HugeGraphServer includes various types of resources, typically including graph, schema, gremlin, traverser and task.
graphcontainsverticesãedgesschemacontainsvertexlabelsãpropertykeysãedgelabelsãindexlabelsgremlincontains variousGremlinstatements, such asg.v(), which can be executed synchronously or asynchronouslytraversercontains various advanced queries including shortest paths, intersections, N-step reachable neighbors, etc.taskcontains query and delete with asynchronous tasks
6.2.1 Get vertices and its related properties in hugegraph
explanation
Since there are many vertices and edges in the graph, for list-type requests, such as getting all vertices, getting all edges, etc., the server will compress the data and return it, so when use curl, you get a bunch of garbled characters, you can redirect to gunzip for decompression. It is recommended to use the Chrome browser + Restlet plugin to send HTTP requests for testing.
The current default configuration of HugeGraphServer can only be accessed locally, and the configuration can be modified so that it can be accessed on other machines.
response body:
For the detailed API, please refer to RESTful-API
You can also visit localhost:8080/swagger-ui/index.html to check the API.

When using Swagger UI to debug the API provided by HugeGraph, if HugeGraph Server turns on authentication mode, you can enter authentication information on the Swagger page.

Currently, HugeGraph supports setting authentication information in two forms: Basic and Bearer.

7 Stop Server
8 Debug Server with IntelliJ IDEA
Please refer to Setup Server in IDEA
2 - HugeGraph-PD Quick Start
1 HugeGraph-PD Overview
HugeGraph-PD (Placement Driver) is the metadata management component of HugeGraph’s distributed version, responsible for managing the distribution of graph data and coordinating storage nodes. It plays a central role in distributed HugeGraph, maintaining cluster status and coordinating HugeGraph-Store storage nodes.
PD keeps cluster metadata in an embedded RocksDB store under pd.data-path and replicates it across PD nodes with Raft, so a 3-node or 5-node PD cluster keeps serving while a minority of nodes is down. On top of that it registers and activates Store nodes, allocates and rebalances partitions, tracks Store heartbeats, and answers service discovery queries from Store and Server.
PD listens on three ports:
| Port | Default | Configured by | Used by |
|---|---|---|---|
| gRPC | 8686 | grpc.port | Store and Server clients |
| REST | 8620 | server.port | Management, health checks, metrics |
| Raft | 8610 | raft.address | The other PD nodes only |
2 Prerequisites
2.1 Requirements
- Operating System: Linux or macOS (Windows has not been fully tested)
- Java version: âĨ 11
- Maven version: âĨ 3.5.0
3 Deployment
There are two ways to deploy the HugeGraph-PD component:
- Method 1: Download the tar package
- Method 2: Compile from source
3.1 Download the tar package
Download the latest version of HugeGraph-PD from the Apache HugeGraph official download page:
3.2 Compile from source
To build only the PD distribution and the modules it depends on:
The unpacked distribution contains just three directories: bin (start and stop scripts), conf (application.yml, application.yml.template, log4j2.xml, verify-license.json) and lib (the hg-pd-service jar).
3.3 Docker Deployment
The HugeGraph-PD Docker image is available on Docker Hub as hugegraph/pd.
Note: The following steps assume you have already cloned or pulled the HugeGraph main repository locally, or at least have its
docker/directory available.
Use the docker compose setup to deploy the complete 3-node cluster (PD + Store + Server):
A single PD plus a single Store and Server is also available as docker-compose-hstore.yml.
To run a single PD node via docker run, configuration is provided via environment variables:
Environment variable reference:
| Variable | Required | Default | Maps to | Description |
|---|---|---|---|---|
HG_PD_GRPC_HOST | Yes | n/a | grpc.host | This node’s hostname/IP for gRPC (e.g. pd0 in Docker, 192.168.1.10 on bare metal) |
HG_PD_RAFT_ADDRESS | Yes | n/a | raft.address | This node’s Raft address (e.g. pd0:8610) |
HG_PD_RAFT_PEERS_LIST | Yes | n/a | raft.peers-list | All PD peers (e.g. pd0:8610,pd1:8610,pd2:8610) |
HG_PD_INITIAL_STORE_LIST | Yes | n/a | pd.initial-store-list | Expected store gRPC addresses (e.g. store0:8500,store1:8500,store2:8500) |
HG_PD_GRPC_PORT | No | 8686 | grpc.port | gRPC server port |
HG_PD_REST_PORT | No | 8620 | server.port | REST API port |
HG_PD_DATA_PATH | No | /hugegraph-pd/pd_data | pd.data-path | Metadata storage path |
HG_PD_INITIAL_STORE_COUNT | No | 1 | pd.initial-store-count | Minimum stores required for cluster availability |
The entrypoint refuses to start if any of the four required variables is missing, and it turns the values above into a SPRING_APPLICATION_JSON override, so the packaged conf/application.yml does not need editing. Any key not covered by an HG_PD_* variable keeps the value from that file. JAVA_OPTS is passed through to the JVM.
Note: In Docker bridge networking, use container hostnames (e.g.
pd0) forHG_PD_GRPC_HOSTandHG_PD_RAFT_ADDRESSinstead of IP addresses.
Deprecated aliases:
GRPC_HOST,RAFT_ADDRESS,RAFT_PEERS,PD_INITIAL_STORE_LISTstill work but log a deprecation warning. Use theHG_PD_*names for new deployments.
The image ships a HEALTHCHECK that polls GET /v1/health on port 8620 every 15 seconds, with a 90 second start period and 3 retries, so docker ps reports real PD health. The entrypoint runs the start script with -d false, so the container process is Java itself and Docker’s restart policy fires when it dies. The image also sets STDOUT_MODE=true, so docker logs <container-name> (e.g. docker logs hg-pd0) shows the PD log without exec-ing into the container.
See docker/README.md for the full cluster setup guide.
4 Configuration
The main configuration file for PD is conf/application.yml. This is the file the distribution ships:
conf/application.yml.template is a second, unused copy with placeholders ($GRPC_PORT$, $RAFT_ADDRESS$ and so on) for deployment tooling that generates the file. PD always reads conf/application.yml, which the start script passes as -Dspring.config.location.
4.1 Configuration reference
Keys not present in conf/application.yml fall back to the built-in default listed below. Keys with no built-in default must be present, otherwise PD fails to start.
gRPC and REST
| Key | Shipped value | Built-in default | Description |
|---|---|---|---|
grpc.host | 127.0.0.1 | none, required | Address this PD advertises for gRPC. Store and Server connect here, so set it to a reachable IPv4 address or hostname, never 127.0.0.1 or 0.0.0.0, in a distributed deployment. |
grpc.port | 8686 | none, required | gRPC port. |
server.port | 8620 | none, required | REST API port. Also the port reported in Raft member information. |
application.yml.template also carries grpc.netty-server.max-inbound-message-size: 100MB, but PD sets the gRPC server’s inbound message limit to 1 GB in code, so that key has no effect.
Raft
| Key | Shipped value | Built-in default | Description |
|---|---|---|---|
raft.address | 127.0.0.1:8610 | none, required | Raft address of this node as host:port. Must be unique per node and must appear in raft.peers-list. |
raft.peers-list | 127.0.0.1:8610 | none, required | Comma separated Raft addresses of every PD node, including this one. Must be identical on all nodes. |
raft.enable | not set | true | When true, metadata writes go through the Raft state machine. When false, PD writes straight to its local store with no replication. |
raft.ip-whitelist.enabled | not set | true | When true, the Raft RPC port accepts connections only from the addresses resolved from raft.peers-list; other clients are dropped and logged as Blocked connection from <ip>. The allowlist is re-resolved when the peer list changes, but a peer that keeps its hostname and changes IP (a restarted container, for example) needs a PD restart. |
raft.snapshotInterval | not set | 300 | Seconds between Raft snapshots. |
raft.rpc-timeout | not set | 10000 | Raft RPC connect, request and install-snapshot timeout, in milliseconds. |
PD core
| Key | Shipped value | Built-in default | Description |
|---|---|---|---|
pd.data-path | ./pd_data | none, required | Metadata directory. Holds the RocksDB store in rocksdb/ and the Raft log, metadata and snapshots in pd_raft/. |
pd.patrol-interval | 1800 | 300 | Seconds between patrol runs, which check partition health across stores and rebalance partition counts. |
pd.initial-store-count | 1 | 3 | Minimum number of active Store nodes. Below this the cluster state becomes Cluster_Not_Ready and the cluster is treated as unavailable. Set it to the number of stores you deploy. |
pd.initial-store-list | 127.0.0.1:8500 | empty | Comma separated Store gRPC addresses (ip:port) that are activated automatically when they register. An entry may also carry a group id as store_address/group_id. |
pd.cluster_id | not set | 1 | Cluster id, used to keep separate PD clusters apart. |
Store management
| Key | Shipped value | Built-in default | Description |
|---|---|---|---|
store.keepAlive-timeout | not set | 300 | Seconds without a heartbeat after which a Store is treated as temporarily unavailable and its partition leaders move to other replicas. |
store.max-down-time | 172800 | 1800 | Seconds after which a Store is treated as permanently unavailable and its replicas are reallocated to other machines. |
store.monitor_data_enabled | true | false | Whether to persist Store monitoring samples. |
store.monitor_data_interval | 1 minute | 1 minute | Sampling interval, written as <number> <unit> with unit one of second, minute, hour, day, month, year. The number defaults to 1 when omitted. |
store.monitor_data_retention | 1 day | 1 day | How long monitoring samples are kept, same format as above. |
Partitions
| Key | Shipped value | Built-in default | Description |
|---|---|---|---|
partition.default-shard-count | 1 | 3 | Number of replicas per partition. Use 3 for a production cluster. |
partition.store-max-shard-count | 12 | 24 | Maximum number of partition replicas one Store holds. |
The initial partition count is derived from these two values and the size of pd.initial-store-list:
Discovery, license and metrics
| Key | Shipped value | Built-in default | Description |
|---|---|---|---|
discovery.heartbeat-try-count | not set | 3 | Number of missed heartbeats after which a registered client’s discovery entry is deleted. |
license.verify-path | ./conf/verify-license.json | none, required | Path to the license verification descriptor. Read by the /v1/license endpoints. |
license.license-path | ./conf/hugegraph.license | none, required | Path to the license file. The distribution ships verify-license.json but no license file, so the license endpoints report an error until one is supplied. |
auth.secret-key | not set | built-in constant | HS256 secret used to sign the PD tokens handed back to internal clients. |
management.metrics.export.prometheus.enabled | true | Spring Boot default | Exposes /actuator/prometheus. |
management.endpoints.web.exposure.include | "*" | Spring Boot default | Actuator endpoints to expose. |
logging.config | file:./conf/log4j2.xml | none | Log4j2 configuration. Writes logs/hugegraph-pd.log, logs/hugegraph-pd_raft.log and logs/audit-hugegraph-pd.log. |
Thread pools
| Key | Built-in default | Description |
|---|---|---|
thread.pool.grpc.core | 600 | Core size of the pool that serves gRPC calls. |
thread.pool.grpc.max | 1000 | Maximum size of that pool. |
thread.pool.grpc.queue | unbounded | Queue capacity of that pool. |
job.uninterruptibleThreadPool.core | 0 | Core size of the background metadata job pool. A value of 0 or less means half the available processors. |
job.uninterruptibleThreadPool.max | 256 | Maximum size of that pool. |
job.uninterruptibleThreadPool.queue | unbounded | Queue capacity of that pool. |
4.2 Single-node configuration
The shipped conf/application.yml already is a working single-node configuration. It is meant for development and testing: one PD node has no Raft quorum to lose, and partition.default-shard-count: 1 keeps a single replica per partition.
4.3 Three-node cluster configuration
For a production cluster run 3 or 5 PD nodes, an odd number so Raft always has a quorum. A 3-node cluster tolerates one node failure. raft.peers-list must list every node and must be byte-for-byte identical on all of them, while grpc.host and raft.address differ per node.
Node 1 (192.168.1.10):
Node 2 (192.168.1.11) and node 3 (192.168.1.12) use the same file with grpc.host and raft.address changed to their own address:
To put all three PD nodes on one machine for testing, give each node its own pd.data-path and its own ports, for example raft 8610/8611/8612, gRPC 8686/8687/8688 and REST 8620/8621/8622.
In Docker bridge networking the same configuration comes from environment variables and uses container hostnames instead of IP addresses:
5 Start and Stop
5.1 Start PD
In the PD installation directory, execute:
The script requires a JDK of at least version 11 on PATH or in JAVA_HOME, and it exits without doing anything if it finds a Java process already using this installation’s conf directory.
Supported flags:
| Flag | Values | Default | Description |
|---|---|---|---|
-d | true, false | true | Daemon mode. See the note below. |
-g | zgc, ZGC | not set | Garbage collector. Leave the flag off for the default G1GC. Any other value, g1 included, aborts the start. |
-j | JVM options | empty | Extra JVM options, for example -j "-Xmx8g -Xms8g". |
-y | true, false | false | Attach the OpenTelemetry Java agent. The agent is downloaded into plugins/ on first use, its MD5 is verified, and traces are exported over gRPC to http://127.0.0.1:4317. |
The -d flag controls daemon mode:
-d true(default): run as a background daemon; the script returns immediately.-d false: run in foreground. The scriptexecs Java, so the container or supervisor process IS Java. Use this when running under Docker or a process supervisor (systemd, supervisord) so crashes are detected and the service is restarted automatically.
Each flag also has an environment variable equivalent: DAEMON, GC_OPTION, USER_OPTION and OPEN_TELEMETRY. Setting JAVA_OPTIONS replaces the computed heap settings entirely; otherwise the script sizes the heap between 512 MB and 32 GB from available memory. Setting STDOUT_MODE=true leaves the JVM output on stdout instead of redirecting it to logs/hugegraph-pd-stdout.log, which is what the Docker image does.
After successful startup, you can see logs similar to the following in logs/hugegraph-pd-stdout.log:
The process id is written to bin/pid.
5.2 Stop PD
In the PD installation directory, execute:
The script reads bin/pid, sends the process a termination signal, waits up to 30 seconds for it to exit, and removes the pid file. If bin/pid is missing it reports that and exits successfully.
6 Startup Order in a Distributed Cluster
Start the components in this order:
- All PD nodes. They form the Raft group and elect a leader. Wait until every node answers
GET /v1/health. - All Store nodes. Each Store registers with PD over gRPC, and PD activates the ones listed in
pd.initial-store-list. Wait untilGET /v1/storesreports"state": "Up"for every Store. - All Server nodes. A Server reads
pd.peersand depends on PD reporting at least one live Store before partitions can be assigned.
The Docker Compose topologies enforce exactly this. Store containers wait on PD’s /v1/health healthcheck through depends_on with condition: service_healthy, Server containers wait the same way on the Store healthcheck, and the Server entrypoint then polls PD’s /v1/stores until a Store reports Up before it starts HugeGraph.
PD is also the last component to stop: shut down Server, then Store, then PD.
7 Verification
7.1 REST API authentication
Except for /actuator/*, /v1/health and /v1/prom/targets/*, every PD REST path requires an HTTP Basic Authorization header whose user name is one of the internal service names hg, store, hubble or vermeer. A request without the header is answered with:
The password is not validated yet, so any value works. The Server’s own bin/wait-storage.sh uses store:admin and lets you override it with PD_AUTH_USER and PD_AUTH_PASSWORD, so the examples below use the same credentials:
Warning: This check is only meant to separate HugeGraph’s own components from other traffic. Do not expose the PD REST or gRPC ports to an untrusted network. Restrict them with firewall rules or security groups, and keep
raft.ip-whitelist.enabledon so the Raft port only accepts the configured peers.
7.2 Health check
GET /v1/health needs no credentials and is what the Docker healthcheck uses. It answers 200 with an empty body:
The Spring Boot actuator endpoint also works and is more readable:
If it returns {"status":"UP"}, it indicates that the PD service has been successfully started.
7.3 Cluster and member status
Check the PD members and which node is the Raft leader:
The response carries pdList, the elected pdLeader, numOfService, numOfNormalService and a stateCountMap. In a healthy 3-node PD cluster numOfService and numOfNormalService are both 3 and exactly one member has role: "Leader".
GET /v1/cluster returns the same member list together with the Store list, graph list and overall cluster state, and GET / returns a short summary (leader address, cluster state, member count, store count, graph count, partition count).
7.4 Store status
You can also verify Store node status through the PD API:
If the response shows state as Up, the corresponding Store node is running normally. The example below shows a single Store node. In a healthy 3-node deployment, the storeId list should contain three IDs, and stateCountMap.Up, numOfService, and numOfNormalService should all be 3.
7.5 Other REST endpoints
All paths below are relative to http://<pd-host>:8620 and need the Basic header from section 7.1 unless noted.
| Method and path | Description |
|---|---|
GET / | Brief cluster statistics: leader, state, member count, store count, graph count, partition count |
GET /v1/health | Health check, no authentication required |
GET /v1/cluster | Full cluster statistics: PD members, stores, graphs, partitions |
GET /v1/members | PD member list with roles and the elected leader |
POST /v1/members/change | Change the Raft peer list, body {"peerList": "..."} |
GET /v1/stores | Registered Store nodes with state and per-store statistics |
GET /v1/store/{storeId} | One Store node |
POST /v1/store/{storeId} | Update a Store’s state, body {"storeState": "..."} |
DELETE /v1/store/{storeId} | Remove a Store from the cluster |
POST /v1/store/log | Store state change log, body {"startTime": "...", "endTime": "..."} |
GET /v1/storesAndStats | Raw Store metadata, for debugging |
GET /v1/store_monitor/{storeId} | Store monitoring samples as text |
GET /v1/store_monitor/json/{storeId} | Store monitoring samples as JSON |
GET /v1/shards | Every shard of every partition, with store id, role, state and progress |
GET /v1/shardGroups | Shard groups |
GET /v1/shardGroupsCache | Shard groups from PD’s in-memory cache |
GET /v1/shardLeaders | Partition leaders grouped by Store raft address |
GET /v1/balanceLeaders | Rebalance partition leaders across Stores |
GET /v1/partitions | Partition list with state and statistics |
GET /v1/highLevelPartitions | Partitions with per-graph key counts and data sizes |
GET /v1/partitionsAndStats | Raw partition metadata, for debugging |
POST /v1/partitions/log | Partition change log, body {"startTime": "...", "endTime": "..."} |
GET /v1/resetPartitionState | Reset the state of every partition |
GET /v1/graphs | Graph list |
GET /v1/graph/** | One graph by name |
POST /v1/graph/** | Update a graph’s partition count, body {"partitionCount": N} |
GET /v1/graph/partitionSizeRange | Minimum and maximum partition count the cluster accepts |
GET /v1/graph-spaces | Graph space list |
GET /v1/graph-spaces/** | One graph space |
POST /v1/graph-spaces/** | Update a graph space |
POST /v1/registry | Register a service instance for discovery |
POST /v1/registryInfo | Query registered instances |
GET /v1/allInfo | All registered instances |
GET /v1/license | License context |
GET /v1/license/machineInfo | IP and MAC addresses seen by the license check |
GET /v1/task/patrolStores | Run the store patrol task now |
GET /v1/task/patrolPartitions | Run the partition patrol task now |
GET /v1/task/balancePartitions | Rebalance partitions across Stores |
GET /v1/task/splitPartitions | Run automatic partition splitting now |
GET /v1/task/balanceLeaders | Rebalance partition leaders |
GET /v1/task/compact | Instruct Store nodes to compact the RocksDB files of their partitions |
GET /v1/prom/targets/{appName} | Prometheus service discovery targets, no authentication required |
GET /v1/prom/targets-all | Prometheus targets for all app types |
GET /v1/prom/sd_config | Prometheus HTTP service discovery config |
GET /actuator/health | Spring Boot health, no authentication required |
GET /actuator/metrics | Spring Boot metrics, no authentication required |
GET /actuator/prometheus | Prometheus scrape endpoint, no authentication required |
The two log endpoints take a time range as {"startTime": "...", "endTime": "..."}; yyyy-MM-dd HH:mm:ss and yyyy-MM-dd are among the accepted formats.
PD registers its own meters under the hg prefix, so /actuator/prometheus exposes hg_up, hg_graphs, hg_stores and hg_terms alongside the standard JVM metrics, plus per-graph partition and size meters once graphs exist.
3 - HugeGraph-Store Quick Start
1 HugeGraph-Store Overview
HugeGraph-Store is the storage node component of HugeGraph’s distributed version, responsible for actually storing and managing graph data. It works in conjunction with HugeGraph-PD to form HugeGraph’s distributed storage engine, providing high availability and horizontal scalability.
Each Store node keeps graph data in RocksDB and replicates it with Raft (JRaft): every partition is a separate Raft group, so a partition survives the loss of a minority of its replicas. Store nodes do not know about each other directly. They register with PD, receive their partition assignment from PD, and report state back over a heartbeat. HugeGraph-Server reaches Store over gRPC after looking up partition locations in PD.
2 Prerequisites
2.1 Requirements
- Operating System: Linux or macOS (Windows has not been fully tested)
- Java version: âĨ 11 (enforced by the build and re-checked by
bin/start-hugegraph-store.sh) - Maven version: âĨ 3.5.0
- Deploy HugeGraph-PD first for multi-node deployment
3 Deployment
There are two ways to deploy the HugeGraph-Store component:
- Method 1: Download the tar package
- Method 2: Compile from source
3.1 Download the tar package
Download the latest version of HugeGraph-Store from the Apache HugeGraph official download page:
3.2 Compile from source
To build Store alone instead of the whole repository, build hugegraph-struct first, because Store depends on it:
The assembled directory contains only bin/, conf/ and lib/hg-store-node-{version}.jar.
3.3 Docker Deployment
The HugeGraph-Store Docker image is available on Docker Hub as hugegraph/store.
Note: The following steps assume you have already cloned or pulled the HugeGraph main repository locally, or at least have its
docker/directory available.
Two compose files include Store:
| Compose file | Topology | Use |
|---|---|---|
docker-compose-hstore.yml | 1 PD + 1 Store + 1 Server + 1 Hubble | Smallest distributed setup |
docker-compose-3pd-3store-3server.yml | 3 PD + 3 Store + 3 Server + 1 Hubble | Multi-node reference |
To run a single Store node via docker run:
Environment variable reference:
| Variable | Required | Default | Maps to | Description |
|---|---|---|---|---|
HG_STORE_PD_ADDRESS | Yes | n/a | pdserver.address | PD gRPC addresses (e.g. pd0:8686,pd1:8686,pd2:8686) |
HG_STORE_GRPC_HOST | Yes | n/a | grpc.host | This node’s hostname/IP for gRPC (e.g. store0) |
HG_STORE_RAFT_ADDRESS | Yes | n/a | raft.address | This node’s Raft address (e.g. store0:8510) |
HG_STORE_GRPC_PORT | No | 8500 | grpc.port | gRPC server port |
HG_STORE_REST_PORT | No | 8520 | server.port | REST API port |
HG_STORE_DATA_PATH | No | /hugegraph-store/storage | app.data-path | Data storage path |
The entrypoint turns these into a SPRING_APPLICATION_JSON overlay on top of conf/application.yml, then runs bin/start-hugegraph-store.sh -d false -j "$JAVA_OPTS". Any key not covered by the table above still has to be edited in conf/application.yml, or supplied through your own SPRING_APPLICATION_JSON.
Image details:
JAVA_OPTSdefaults to-XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:MaxRAMPercentage=50 -XshowSettings:vmSTDOUT_MODE=true, so Java logs go to the container stdout instead oflogs/hugegraph-store-server.logHEALTHCHECKcallsGET http://localhost:8520/v1/healthevery 15s after a 90s start period- The image declares
EXPOSE 8520; publish 8500 and 8510 yourself when Server or other Store nodes need to reach the container from outside the Docker network
Note: In Docker bridge networking, use container hostnames (e.g.
store0) forHG_STORE_GRPC_HOSTinstead of IP addresses.
Deprecated aliases:
PD_ADDRESS,GRPC_HOST,RAFT_ADDRESSstill work but log a deprecation warning. Use theHG_STORE_*names for new deployments.
4 Configuration
Store reads two files from conf/:
application.yml, the main configuration file (PD address, ports, Raft, data path)application-pd.yml, pulled in byspring.profiles.include: pdinapplication.yml, holding the RocksDB memory settings and the Actuator exposure
4.1 application.yml
This is the file shipped in the distribution package:
4.2 application-pd.yml
4.3 Configuration reference
“Shipped” is the value in the two files above. “Code default” is what the node falls back to when the key is absent, and is the value to rely on for keys the template does not list.
Core
| Key | Shipped | Code default | Meaning |
|---|---|---|---|
pdserver.address | localhost:8686 | required | PD gRPC endpoints, comma separated. Store registers itself here and receives its partition assignment. Must be PD’s grpc.port, not its REST port. |
grpc.host | 127.0.0.1 | required | Address this node advertises for its own gRPC service. Set it to a routable IP or hostname, 127.0.0.1 is only usable for a single-machine setup. |
grpc.port | 8500 | required | gRPC port. Server and the Store client connect here. |
grpc.netty-server.max-inbound-message-size | 1000MB | gRPC default | Maximum size of a single inbound gRPC message. Bound by the grpc-spring-boot-starter Netty server. |
grpc.server.wait-time | not set | 3600 | Seconds a scan stream waits for the client to consume a page before the server aborts it. |
server.port | 8520 | required | REST and Actuator port. Also reported to PD as the rest.port label. |
Raft
| Key | Shipped | Code default | Meaning |
|---|---|---|---|
raft.address | 127.0.0.1:8510 | required | Raft service address of this node, host:port. Must be reachable from every other Store node. There is no peer list to configure: PD tells each node which peers belong to a partition’s Raft group. |
raft.disruptorBufferSize | 1024 | 0 | Raft task queue size. 0 derives it from rocksdb.total_memory_size, by rounding that size in GB to the nearest power of two and multiplying by 32. |
raft.max-log-file-size | 600000000000 | 50000000000 | Maximum byte size of Raft logs. |
raft.snapshotInterval | 1800 | 300 | Seconds between Raft snapshots. |
raft.snapshotLogIndexMargin | not set | 0 | Minimum applied-index distance since the last snapshot before a snapshot is actually written. 0 disables the distance check. |
raft.rpc-timeout | not set | 10000 | Raft RPC timeout in milliseconds. |
raft.metrics | not set | true | Collect JRaft node metrics, readable at /metrics/raft. |
raft.useRocksDBSegmentLogStorage | not set | true | Store Raft logs in the RocksDB segment log storage. |
raft.maxSegmentFileSize | not set | 67108864 | Segment log file size in bytes (64 MB). |
raft.maxReplicatorInflightMsgs | not set | 256 | Maximum in-flight replication requests per follower. |
raft.maxEntriesSize | not set | 256 | Maximum number of entries in one AppendEntries request. |
raft.maxBodySize | not set | 524288 | Maximum byte size of one AppendEntries request. |
ave-logEntry-size-ratio | not set | 0.95 | Smoothing ratio used to estimate the average log entry size. Note that this key sits at the top level, not under raft. |
Storage and labels
| Key | Shipped | Code default | Meaning |
|---|---|---|---|
app.data-path | ./storage | store | RocksDB data directory. Multiple paths separated by commas spread partitions over several disks. |
app.raft-path | commented out | empty | Directory for Raft logs and snapshots. Falls back to app.data-path when empty. |
app.fake-pd | not set | false | Built-in PD mode for standalone testing. Do not use it in production. |
app.placeholder-size | not set | 10 | Size in GB of a placeholder file created in each data path at startup, so space can be freed in an emergency. 0 disables it. |
app.label.<name> | not set | none | Arbitrary key/value labels sent to PD in the store heartbeat. The node adds rest.port on its own. |
RocksDB
| Key | Shipped | Code default | Meaning |
|---|---|---|---|
rocksdb.total_memory_size | 32000000000 | 51539607552 | Memory budget shared by all RocksDB instances on this node. When absent or 0, the node uses the JVM max heap instead. |
rocksdb.write_buffer_size | 32000000 | 33554432 | Memtable size in bytes. When absent or 0, the node uses total_memory_size / 1000. |
rocksdb.min_write_buffer_number_to_merge | 16 | 16 | Number of memtables merged together before a flush. |
rocksdb.write_buffer_ratio | not set | 0.66 | Share of total_memory_size given to the write cache. The rest becomes the block cache. |
Any other option defined in org/apache/hugegraph/rocksdb/access/RocksDBOptions.java can be added under the same rocksdb: block, for example rocksdb.max_background_jobs, rocksdb.level0_file_num_compaction_trigger or rocksdb.bloom_filter_bits_per_key.
Thread pools
| Key | Code default | Meaning |
|---|---|---|
thread.pool.grpc.core | 600 | Core threads serving gRPC requests. |
thread.pool.grpc.max | 1000 | Maximum gRPC threads. |
thread.pool.grpc.queue | 2147483647 | gRPC task queue capacity. |
thread.pool.scan.core | 128 | Core threads serving scans. 0 means 4 times the CPU count. |
thread.pool.scan.max | 1000 | Maximum scan threads. |
thread.pool.scan.queue | 0 | Scan task queue capacity. |
Query pushdown
| Key | Code default | Meaning |
|---|---|---|
query.push-down.threads | 1500 | Thread pool size for pushed-down queries. |
query.push-down.fetch_batch | 20000 | Rows fetched per request. |
query.push-down.fetch_timeout | 300000 | Fetch timeout in milliseconds. |
query.push-down.memory_limit_count | 50000 | Row limit for in-memory operations such as sorting. |
query.push-down.index_size_limit_count | 50000 | Index sst file size limit in kB. |
Background jobs
| Key | Code default | Meaning |
|---|---|---|
job.interruptableThreadPool.core | 128 | Core threads of the TTL cleaner pool. 0 means the CPU count. |
job.interruptableThreadPool.max | 256 | Maximum threads of the TTL cleaner pool. 0 means 4 times the CPU count. |
job.interruptableThreadPool.queue | 2147483647 | Queue capacity of the TTL cleaner pool. |
job.uninterruptibleThreadPool.core | 0 | Core threads of the engine’s uninterruptible job pool. 0 means the CPU count. |
job.uninterruptibleThreadPool.max | 256 | Maximum threads of the uninterruptible job pool. |
job.uninterruptibleThreadPool.queue | 2147483647 | Queue capacity of the uninterruptible job pool. |
job.cleaner.batch.size | 10000 | Keys deleted per batch by the TTL cleaner. |
job.start-time | 0 | Hour of day (0 to 23) at which the daily TTL cleanup runs. Values outside that range fall back to 19. |
Built-in PD mode
Only for single-node development and debugging, activated by app.fake-pd: true. The node then plays PD’s role itself and ignores pdserver.address.
| Key | Code default | Meaning |
|---|---|---|
fake-pd.store-list | '' | gRPC addresses of the Store nodes in the fake cluster. |
fake-pd.peers-list | '' | Raft addresses of the same nodes. |
fake-pd.partition-count | 3 | Number of partitions. |
fake-pd.shard-count | 3 | Replicas per partition. |
Diagnostics
| Key | Code default | Meaning |
|---|---|---|
arthas.telnetPort | 8566 | Arthas telnet port, used when /v1/arthasstart is called. |
arthas.httpPort | 8565 | Arthas HTTP port. |
arthas.ip | 0.0.0.0 | Arthas bind address. |
arthas.disabledCommands | jad | Arthas commands to disable. |
4.4 Per-node changes
For multi-node deployment, you need to modify the following configurations for each Store node:
grpc.hostandgrpc.port(the address other components dial)raft.address(Raft protocol address)server.port(REST port)app.data-path(data storage path)
pdserver.address is the same on every node, it lists the whole PD cluster.
5 Start and Stop
5.1 Start Store
Ensure that the PD service is already started, then in the Store installation directory, execute:
The script accepts four flags:
| Flag | Values | Default | Description |
|---|---|---|---|
-d | true, false | true | Daemon mode. See below. |
-g | ZGC, zgc | not set | Garbage collector. Omit the flag for G1, which is the default. Any value other than ZGC or zgc aborts the start, including g1, even though the script’s own usage line suggests it. |
-j | JVM options string | empty | Extra JVM options, for example -j "-Xmx16g -Xms8g". |
-y | true, false | false | Attach the OpenTelemetry Java agent, downloading it into plugins/ on first use, and export traces to 127.0.0.1:4317. |
Daemon mode:
-d true(default): run as a background daemon. The script returns immediately and writes the Java pid tobin/pid.-d false: run in the foreground. The scriptexecs Java, so the container or supervisor process is Java itself. Use this under Docker or a process supervisor (systemd, supervisord) so crashes are detected and the service is restarted automatically.
JVM memory, unless you set JAVA_OPTIONS yourself: -Xms512m, and -Xmx set to half the free memory, clamped to the 512 MB to 2048 MB range. The script also adds -XX:MetaspaceSize=256M, a heap dump on out-of-memory into logs/, and a rolling GC log at logs/gc.log. Production nodes normally need a much larger heap, so pass one explicitly, for example -j "-Xmx32g -Xms32g".
The script refuses to start if ulimit -n or ulimit -u is below 1024, and it preloads jemalloc on x86_64 and arm64 when the shared object can be downloaded and verified.
After successful startup, you can see logs similar to the following in logs/hugegraph-store-server.log:
5.2 Stop Store
In the Store installation directory, execute:
The script reads bin/pid, signals that process, and waits up to 30 seconds for it to exit before removing the pid file. If bin/pid is missing it exits without doing anything.
5.3 Restart Store
It sources the stop script and then the start script, and forwards the flags from section 5.1.
5.4 Startup order
- PD first. Each Store’s
grpc.host:grpc.portshould appear in PD’spd.initial-store-list, otherwise PD registers the node inPendingstate instead of bringing it toUp, and partition assignment never finishes. - Store next. A Store started before PD is reachable is not fatal: the heartbeat thread keeps retrying registration and logs
store heartbeat error: PD UNREACHABLEuntil PD answers. - HugeGraph-Server last, once every Store node reports
state: "Up". Server needs the partitions in place before it can initialize or open a graph.
The compose files encode the same order with depends_on: condition: service_healthy: Store waits for every PD healthcheck, and Server waits for every Store healthcheck.
6 Multi-Node Deployment Example
Below is a configuration example for a three-node deployment:
6.1 Three-Node Configuration Reference
- 3 PD nodes
- raft ports: 8610, 8611, 8612
- rpc ports: 8686, 8687, 8688
- rest ports: 8620, 8621, 8622
- 3 Store nodes
- raft ports: 8510, 8511, 8512
- rpc ports: 8500, 8501, 8502
- rest ports: 8520, 8521, 8522
6.2 Store Node Configuration
For the three Store nodes, the main configuration differences are as follows:
Node A:
Node B:
Node C:
All nodes should point to the same PD cluster:
And every PD node should list all three Store gRPC addresses:
6.3 Docker Distributed Cluster Configuration
The distributed Store cluster definition is included in docker/docker-compose-3pd-3store-3server.yml. Each Store node gets its own hostname and environment variables:
The container ports stay 8500/8510/8520 on every node, only the published host ports differ. The PD nodes set HG_PD_INITIAL_STORE_LIST: store0:8500,store1:8500,store2:8500 to match.
Store nodes start only after all PD nodes pass healthchecks (/v1/health), enforced via depends_on: condition: service_healthy.
To view runtime logs for a running Store container use docker logs <container-name> (e.g. docker logs hg-store0).
See docker/README.md for the full setup guide.
7 Verify Store Service
Confirm that the Store service is running properly:
If it returns {"status":"UP"}, it indicates that the Store service has been successfully started.
GET /v1/health is the lighter check used by the Docker image and the compose files. It answers HTTP 200 with an empty body, so use curl -fsS and check the exit code rather than the output:
7.1 Store REST endpoints
The Store node exposes these read-only endpoints on server.port:
| Method | Path | Description |
|---|---|---|
| GET | /v1/health | Liveness probe, HTTP 200 with an empty body |
| GET | /actuator/health | Spring Boot Actuator health, {"status":"UP"} |
| GET | /actuator/prometheus | Prometheus scrape endpoint |
| GET | / | Node summary, leaderCount and partitionCount |
| GET | /-/state | Node state, one of STARTING, ONLINE, STOPPING |
| GET | /-/echo?name=<text> | Echo check |
| GET | /-/scan | State of the running scan streams |
| GET | /v1/partitions | All Raft groups on this node with per-partition metrics. Add ?flags=accurate for exact key counts, which is slower. |
| GET | /v1/partition/{id} | One Raft group by partition id, including role, leader, peers and committed index |
| GET | /metrics/system | Host CPU and memory metrics |
| GET | /metrics/drive | Disk metrics for the data paths |
| GET | /metrics/raft | JRaft node metrics, needs raft.metrics: true |
Actuator and Prometheus are reachable because the shipped configuration sets management.endpoints.web.exposure.include: "*" and management.metrics.export.prometheus.enabled: true.
The node also serves maintenance endpoints that change state or run heavy work: PUT /-/state, GET /-/cleaner, GET /v1/partition/dump/{id}, GET /v1/partition/clean/{id}, POST /v1/compat?id=<partition>, GET /v1/arthasstart, POST /raft/options, and the /fix/* and /test/* groups. Use them only for troubleshooting, and keep the REST port off untrusted networks.
7.2 Check registration from PD
You can also check Store node status through the PD API:
PD requires basic auth on its REST port. The user name must be one of hg, store, hubble, vermeer, and the password is not validated yet. A call with no credentials returns {"status":-1,"error":"Unauthorized!"}. Only /v1/health, /actuator/* and /v1/prom/targets/* are exempt.
If Store is configured successfully, the response should include status information for the current node, and state: "Up" means the node is running normally. A node stuck at Pending is usually missing from PD’s pd.initial-store-list.
The example below shows a single Store node. If all three nodes are configured correctly and running, the storeId list should contain three IDs, and stateCountMap.Up, numOfService, and numOfNormalService should all be 3.