This file provides guidance to AI coding assistants (Claude Code, Cursor, GitHub Copilot, etc.) when working with code in this repository.
Apache HugeGraph Toolchain - a multi-module Maven project providing utilities for the HugeGraph graph database. Current version: 1.7.0.
mvn clean install -DskipTests -Dmaven.javadoc.skip=true -ntpJava Client:
mvn -e compile -pl hugegraph-client -Dmaven.javadoc.skip=true -ntpLoader (requires client):
mvn install -pl hugegraph-client,hugegraph-loader -am -DskipTests -ntpHubble (requires client + loader):
mvn install -pl hugegraph-client,hugegraph-loader -am -DskipTests -ntp
cd hugegraph-hubble && mvn package -DskipTests -ntpTools:
mvn install -pl hugegraph-client,hugegraph-tools -am -DskipTests -ntpSpark Connector:
mvn install -pl hugegraph-client,hugegraph-spark-connector -am -DskipTests -ntpGo Client:
cd hugegraph-client-go && make allcd hugegraph-client
mvn test -Dtest=UnitTestSuite # Unit tests (no server required)
mvn test -Dtest=ApiTestSuite # API tests (requires HugeGraph server)
mvn test -Dtest=FuncTestSuite # Functional tests (requires HugeGraph server)cd hugegraph-loader
mvn test -P unit # Unit tests
mvn test -P file # File source tests
mvn test -P hdfs # HDFS tests (requires Hadoop)
mvn test -P jdbc # JDBC tests (requires MySQL)
mvn test -P kafka # Kafka testsmvn test -P unit-test -pl hugegraph-hubble/hubble-be -ntpmvn test -Dtest=FuncTestSuite -pl hugegraph-tools -ntpCheckstyle 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:checkhugegraph-loader, hugegraph-tools, hugegraph-hubble, hugegraph-spark-connector
↓
hugegraph-client
↓
hugegraph-common (external)
hugegraph-client - Manager/Facade pattern:
HugeClientis the entry point providing access to specialized managersSchemaManager,GraphManager,GremlinManager,TraverserManager, etc.- Builder pattern for fluent schema creation
hugegraph-loader - Pipeline with Factory pattern:
InputSourceinterface with implementations:FileSource,HDFSSource,JDBCSource,KafkaSource,GraphSourceInputReader.create()factory method creates appropriate reader for source type
hugegraph-hubble - Spring Boot MVC:
- Backend:
controller/→service/→mapper/layers - Frontend: React + TypeScript + MobX + Ant Design
- H2 database for metadata storage
hugegraph-tools - Command pattern:
- Manager classes for operations:
BackupManager,RestoreManager,GraphsManager
| Module | Main Code | Package |
|---|---|---|
| client | hugegraph-client/src/main/java |
org.apache.hugegraph |
| loader | hugegraph-loader/src/main/java |
org.apache.hugegraph.loader |
| hubble-be | hugegraph-hubble/hubble-be/src/main/java |
org.apache.hugegraph |
| hubble-fe | hugegraph-hubble/hubble-fe/src |
React/TypeScript |
| tools | hugegraph-tools/src/main/java |
org.apache.hugegraph |
| spark | hugegraph-spark-connector/src/main/scala |
org.apache.hugegraph.spark |
cd hugegraph-hubble/apache-hugegraph-hubble-*/bin
./start-hubble.sh # Background
./start-hubble.sh -f # Foreground
./stop-hubble.sh # Stopcd hugegraph-loader/apache-hugegraph-loader-*
./bin/hugegraph-loader.sh [options]# Loader
cd hugegraph-loader && docker build -t hugegraph/hugegraph-loader:latest .
# Hubble
cd hugegraph-hubble && docker build -t hugegraph/hugegraph-hubble:latest .