Skip to content

apache/incubator-hugegraph-toolchain

hugegraph-toolchain

License Build Status Build Status Build Status Build Status Maven Central Ask DeepWiki

What is HugeGraph Toolchain?

A comprehensive suite of client SDKs, data tools, and management utilities for Apache HugeGraph graph database. Build applications, load data, and manage graphs with production-ready tools.

Quick Navigation: Architecture | Quick Start | Modules | Build | Docker | Related Projects

Related Projects

HugeGraph Ecosystem:

  1. hugegraph - Core graph database (pd / store / server / commons)
  2. hugegraph-computer - Distributed graph computing system
  3. hugegraph-ai - Graph AI/LLM/Knowledge Graph integration
  4. hugegraph-website - Documentation and website

Architecture Overview

graph TB
    subgraph server ["HugeGraph Server"]
        SERVER[("Graph Database")]
    end

    subgraph distributed ["Distributed Mode (Optional)"]
        PD["hugegraph-pd<br/>(Placement Driver)"]
        STORE["hugegraph-store<br/>(Storage Nodes)"]
    end

    subgraph clients ["Client SDKs"]
        CLIENT["hugegraph-client<br/>(Java)"]
    end

    subgraph data ["Data Tools"]
        LOADER["hugegraph-loader<br/>(Batch Import)"]
        SPARK["hugegraph-spark-connector<br/>(Spark I/O)"]
    end

    subgraph mgmt ["Management Tools"]
        HUBBLE["hugegraph-hubble<br/>(Web UI)"]
        TOOLS["hugegraph-tools<br/>(CLI)"]
    end

    SERVER <-->|REST API| CLIENT
    PD -.->|coordinates| STORE
    SERVER -.->|distributed backend| PD

    CLIENT --> LOADER
    CLIENT --> HUBBLE
    CLIENT --> TOOLS
    CLIENT --> SPARK
    HUBBLE -.->|WIP: pd-client| PD

    LOADER -.->|Sources| SRC["CSV | JSON | HDFS<br/>MySQL | Kafka"]
    SPARK -.->|I/O| SPK["Spark DataFrames"]

    style distributed stroke-dasharray: 5 5
Loading
ASCII diagram (for terminals/editors)
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚   HugeGraph Server      โ”‚
                    โ”‚   (Graph Database)      โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚ REST API
        โ”Œ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”ผ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”
          Distributed (Optional)โ”‚
        โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”‚       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
            โ”‚hugegraph- โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚hugegraph- โ”‚
        โ”‚   โ”‚    pd     โ”‚               โ”‚   store   โ”‚   โ”‚
            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”” โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”€ โ”˜
                                โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ”‚                     โ”‚                     โ”‚
          โ–ผ                     โ–ผ                     โ–ผ
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚ hugegraph-     โ”‚    โ”‚ Other Client   โ”‚    โ”‚  Other REST    โ”‚
 โ”‚ client (Java)  โ”‚    โ”‚ SDKs (Go/Py)   โ”‚    โ”‚  Clients       โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚ depends on
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚       โ”‚           โ”‚                   โ”‚
 โ–ผ       โ–ผ           โ–ผ                   โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ loader โ”‚ โ”‚ hubble โ”‚ โ”‚  tools   โ”‚ โ”‚ spark-connector   โ”‚
โ”‚ (ETL)  โ”‚ โ”‚ (Web)  โ”‚ โ”‚  (CLI)   โ”‚ โ”‚ (Spark I/O)       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Quick Start

Prerequisites

Requirement Version Notes
JDK 11+ LTS recommended
Maven 3.6+ For building from source
HugeGraph Server 1.5.0+ Required for client/loader

Choose Your Path

I want to... Use This Get Started
Visualize graphs via Web UI Hubble Docker: docker run -p 8088:8088 hugegraph/hugegraph-hubble
Load CSV/JSON data into graph Loader CLI with JSON mapping config (docs)
Build a Java app with HugeGraph Client Maven dependency (example)
Backup/restore graphs Tools CLI commands (docs)
Process graphs with Spark Spark Connector DataFrame API (module)

Docker Quick Start

# Hubble Web UI (port 8088)
docker run -d -p 8088:8088 --name hubble hugegraph/hugegraph-hubble

# Loader (batch data import)
docker run --rm hugegraph/hugegraph-loader ./bin/hugegraph-loader.sh -f example.json

Module Overview

hugegraph-client

Purpose: Official Java SDK for HugeGraph Server

Key Features:

  • Schema management (PropertyKey, VertexLabel, EdgeLabel, IndexLabel)
  • Graph operations (CRUD vertices/edges)
  • Gremlin query execution
  • Built-in traversers (shortest path, k-neighbor, k-out, paths, etc.)
  • Multi-graph and authentication support

Entry Point: org.apache.hugegraph.driver.HugeClient

Quick Example:

HugeClient client = HugeClient.builder("http://localhost:8080", "hugegraph").build();

// Schema management
client.schema().propertyKey("name").asText().ifNotExist().create();
client.schema().vertexLabel("person")
    .properties("name")
    .ifNotExist()
    .create();

// Graph operations
Vertex vertex = client.graph().addVertex(T.label, "person", "name", "Alice");

๐Ÿ“– Documentation | ๐Ÿ“ Source


Other Client SDKs

hugegraph-client-go (Go SDK - WIP)

Purpose: Official Go SDK for HugeGraph Server

Key Features:

  • RESTful API client for HugeGraph
  • Schema and graph operations
  • Gremlin query support
  • Idiomatic Go interface

Entry Point: github.com/apache/hugegraph-toolchain/hugegraph-client-go

Quick Example:

import "github.com/apache/hugegraph-toolchain/hugegraph-client-go"

client := hugegraph.NewClient("http://localhost:8080", "hugegraph")
// Schema and graph operations

๐Ÿ“ Source

Looking for other languages? See hugegraph-python-client in the hugegraph-ai repository.


hugegraph-loader

Purpose: Batch data import tool from multiple data sources

Key Features:

  • Sources: CSV, JSON, HDFS, MySQL, Kafka, existing HugeGraph
  • JSON-based mapping configuration
  • Parallel loading with configurable threads
  • Error handling and retry mechanisms
  • Progress tracking and logging

Entry Point: bin/hugegraph-loader.sh

Quick Example:

# Load data from CSV
./bin/hugegraph-loader.sh -f mapping.json -g hugegraph

# Example mapping.json structure
{
  "vertices": [
    {
      "label": "person",
      "input": { "type": "file", "path": "persons.csv" },
      "mapping": { "name": "name", "age": "age" }
    }
  ]
}

๐Ÿ“– Documentation | ๐Ÿ“ Source


hugegraph-hubble

Purpose: Web-based graph management and visualization platform

Key Features:

  • Schema management with visual editor
  • Data loading interface
  • Graph visualization and exploration
  • Gremlin query console
  • Multi-graph workspace management
  • User authentication and authorization

Technology Stack: Spring Boot + React + TypeScript + MobX + Ant Design

Entry Point: bin/start-hubble.sh (default port: 8088)

Quick Start:

cd hugegraph-hubble/apache-hugegraph-hubble-incubating-*/bin
./start-hubble.sh      # Background mode
./start-hubble.sh -f   # Foreground mode
./stop-hubble.sh       # Stop server

๐Ÿ“– Documentation | ๐Ÿ“ Source


hugegraph-tools

Purpose: Command-line utilities for graph operations

Key Features:

  • Backup and restore graphs
  • Graph migration
  • Graph cloning
  • Metadata management
  • Batch operations

Entry Point: bin/hugegraph CLI commands

Quick Example:

# Backup graph
bin/hugegraph backup -t all -d ./backup

# Restore graph
bin/hugegraph restore -t all -d ./backup

๐Ÿ“ Source


hugegraph-spark-connector

Purpose: Spark integration for reading and writing HugeGraph data

Key Features:

  • Read HugeGraph vertices/edges as Spark DataFrames
  • Write DataFrames to HugeGraph
  • Spark SQL support
  • Distributed graph processing

Entry Point: Scala API with Spark DataSource v2

Quick Example:

// Read vertices as DataFrame
val vertices = spark.read
  .format("hugegraph")
  .option("host", "localhost:8080")
  .option("graph", "hugegraph")
  .option("type", "vertex")
  .load()

// Write DataFrame to HugeGraph
df.write
  .format("hugegraph")
  .option("host", "localhost:8080")
  .option("graph", "hugegraph")
  .save()

๐Ÿ“ Source

Maven Dependencies

<!-- Note: Use the latest release version in Maven Central -->
<dependency>
    <groupId>org.apache.hugegraph</groupId>
    <artifactId>hugegraph-client</artifactId>
    <version>1.7.0</version>
</dependency>

<dependency>
    <groupId>org.apache.hugegraph</groupId>
    <artifactId>hugegraph-loader</artifactId>
    <version>1.7.0</version>
</dependency>

Check Maven Central for the latest versions.

Build & Development

Full Build

mvn clean install -DskipTests -Dmaven.javadoc.skip=true -ntp

Module-Specific Builds

Module Build Command
Client mvn -e compile -pl hugegraph-client -Dmaven.javadoc.skip=true -ntp
Loader mvn install -pl hugegraph-client,hugegraph-loader -am -DskipTests -ntp
Hubble mvn install -pl hugegraph-client,hugegraph-loader -am -DskipTests -ntp && cd hugegraph-hubble && mvn package -DskipTests -ntp
Tools mvn install -pl hugegraph-client,hugegraph-tools -am -DskipTests -ntp
Spark mvn install -pl hugegraph-client,hugegraph-spark-connector -am -DskipTests -ntp
Go Client cd hugegraph-client-go && make all

Running Tests

Module Test Type Command
Client Unit (no server) mvn test -pl hugegraph-client -Dtest=UnitTestSuite
Client API (server needed) mvn test -pl hugegraph-client -Dtest=ApiTestSuite
Client Functional mvn test -pl hugegraph-client -Dtest=FuncTestSuite
Loader Unit mvn test -pl hugegraph-loader -P unit
Loader File sources mvn test -pl hugegraph-loader -P file
Loader HDFS mvn test -pl hugegraph-loader -P hdfs
Loader JDBC mvn test -pl hugegraph-loader -P jdbc
Loader Kafka mvn test -pl hugegraph-loader -P kafka
Hubble Unit mvn test -P unit-test -pl hugegraph-hubble/hubble-be
Tools Functional mvn test -pl hugegraph-tools -Dtest=FuncTestSuite

Code Style

Checkstyle is enforced via tools/checkstyle.xml:

  • Max line length: 100 characters
  • 4-space indentation (no tabs)
  • No star imports
  • No System.out.println

Run checkstyle:

mvn checkstyle:check

Docker

Official Docker images are available on Docker Hub:

Image Purpose Port
hugegraph/hugegraph-hubble Web UI 8088
hugegraph/hugegraph-loader Data loader -

Examples:

# Hubble
docker run -d -p 8088:8088 --name hubble hugegraph/hugegraph-hubble

# Loader (mount config and data)
docker run --rm \
  -v /path/to/config:/config \
  -v /path/to/data:/data \
  hugegraph/hugegraph-loader \
  ./bin/hugegraph-loader.sh -f /config/mapping.json

Build images locally:

# Loader
cd hugegraph-loader && docker build -t hugegraph/hugegraph-loader:latest .

# Hubble
cd hugegraph-hubble && docker build -t hugegraph/hugegraph-hubble:latest .

Documentation

Contributing

Welcome to contribute to HugeGraph! Please see How to Contribute for more information.

Note: It's recommended to use GitHub Desktop to simplify the PR and commit process.

Thank you to all the people who already contributed to HugeGraph!

contributors graph

Community & Contact

WeChat QR code

License

hugegraph-toolchain is licensed under Apache 2.0 License.