Version 1.5 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot.
For up-to-date documentation, see the latest version.
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.
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:
# Replace {version} with the latest version number, e.g., 1.5.0wget https://downloads.apache.org/incubator/hugegraph/{version}/apache-hugegraph-incubating-{version}.tar.gz
tar zxf apache-hugegraph-incubating-{version}.tar.gz
cd apache-hugegraph-incubating-{version}/apache-hugegraph-pd-incubating-{version}
3.2 Compile from source
# 1. Clone the source codegit clone https://github.com/apache/hugegraph.git
# 2. Build the projectcd hugegraph
mvn clean install -DskipTests=true# 3. After successful compilation, the PD module build artifacts will be located at# apache-hugegraph-incubating-{version}/apache-hugegraph-pd-incubating-{version}# target/apache-hugegraph-incubating-{version}.tar.gz
4 Configuration
The main configuration file for PD is conf/application.yml. Here are the key configuration items:
spring:application:name:hugegraph-pdgrpc:# gRPC port for cluster modeport:8686host:127.0.0.1server:# REST service portport:8620pd:# Storage pathdata-path:./pd_data# Auto-expansion check cycle (seconds)patrol-interval:1800# Initial store list, stores in the list are automatically activatedinitial-store-count:1# Store configuration information, format is IP:gRPC portinitial-store-list:127.0.0.1:8500raft:# Cluster modeaddress:127.0.0.1:8610# Raft addresses of all PD nodes in the clusterpeers-list:127.0.0.1:8610store:# Store offline time (seconds). After this time, the store is considered permanently unavailablemax-down-time:172800# Whether to enable store monitoring data storagemonitor_data_enabled:true# Monitoring data intervalmonitor_data_interval:1minute# Monitoring data retention timemonitor_data_retention:1dayinitial-store-count:1partition:# Default number of replicas per partitiondefault-shard-count:1# Default maximum number of replicas per machinestore-max-shard-count:12
For multi-node deployment, you need to modify the port and address configurations for each node to ensure proper communication between nodes.
5 Start and Stop
5.1 Start PD
In the PD installation directory, execute:
./bin/start-hugegraph-pd.sh
After successful startup, you can see logs similar to the following in logs/hugegraph-pd-stdout.log:
2024-xx-xx xx:xx:xx [main] [INFO] o.a.h.p.b.HugePDServer - Started HugePDServer in x.xxx seconds (JVM running for x.xxx)
5.2 Stop PD
In the PD installation directory, execute:
./bin/stop-hugegraph-pd.sh
6 Verification
Confirm that the PD service is running properly:
curl http://localhost:8620/actuator/health
If it returns {"status":"UP"}, it indicates that the PD service has been successfully started.
Additionally, you can verify the status of the Store node by querying the PD API:
curl http://localhost:8620/v1/stores
If the Store is configured successfully, the response of the above interface should contain the status information of the current node. The status “Up” indicates that the node is running normally. Only the response of one node configuration is shown here. If all three nodes are configured successfully and are running, the storeId list in the response should contain three IDs, and the Up, numOfService, and numOfNormalService fields in stateCountMap should be 3.