Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,16 @@ max_line_length = 120
ij_wrap_on_typing = true
ij_visual_guides = 120


[*.{java,xml,py}]
indent_style = space
indent_size = 4

[*.{java,xml}]
# Ignore the IDEA unsupported warning & it works well (indeed)
continuation_indent_size = 8

[*.md]
max_line_length = off
max_line_length = unset
ij_visual_guides = 160
ij_wrap_on_typing = false

[*.java]
Expand Down
27 changes: 27 additions & 0 deletions .serena/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Serena project context

This directory is a compact navigation cache for coding agents. It is not an independent documentation set and must not duplicate product guides, option tables or release history.

## Read order

1. [`../AGENTS.md`](../AGENTS.md) for repository-wide constraints and validation expectations.
2. [`../docs/README.md`](../docs/README.md) for the authoritative documentation map.
3. The nearest module `AGENTS.md` and README for the code being changed.
4. A memory below only when a quick architecture or file-location map is useful.

## Maintained memories

| Memory | Purpose |
|---|---|
| [project_overview.md](memories/project_overview.md) | Stable product scope and authoritative entry points |
| [architecture_and_modules.md](memories/architecture_and_modules.md) | High-level module ownership and runtime relationships |
| [key_file_locations.md](memories/key_file_locations.md) | Search anchors for common work areas |

Build commands, style rules, test selection and completion checks belong in `AGENTS.md`, module files and executable CI configuration. Keeping them there prevents this cache from drifting.

## Maintenance policy

- Store stable relationships and search anchors, not timestamps, onboarding status, pull-request links, commit hashes or copied release numbers.
- Link to the owning file instead of reproducing long procedures.
- Update or remove a memory in the same change when module ownership or a referenced path changes.
- Keep each memory small enough to load on demand; do not turn the cache into a second README tree.
62 changes: 26 additions & 36 deletions .serena/memories/architecture_and_modules.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,26 @@
# Architecture and Module Structure

## Three-Tier Architecture

### 1. Client Layer
- Gremlin/Cypher queries, REST APIs, Swagger UI

### 2. Server Layer (hugegraph-server, 8 submodules)
- **REST API** (hugegraph-api): GraphAPI, SchemaAPI, GremlinAPI, CypherAPI, AuthAPI, GraphSpaceAPI (distributed only), ManagerAPI (distributed only)
- **Graph Engine** (hugegraph-core): Schema (with TTL update), traversal, task scheduling, GraphSpace multi-tenancy
- **Backend Interface**: Pluggable via `BackendStore`

### 3. Storage Layer
- RocksDB (default/embedded), HStore (distributed/production)
- HBase (deprecated; planned for removal in 2.0)

## Module Structure (7 top-level modules)

### hugegraph-server (8 submodules)
`hugegraph-core`, `hugegraph-api` (includes `opencypher/`, `space/`), `hugegraph-dist`, `hugegraph-test`, `hugegraph-example`, plus backends: `hugegraph-rocksdb`, `hugegraph-hstore`, `hugegraph-hbase`

### hugegraph-pd (8 submodules)
Placement Driver: `hg-pd-core`, `hg-pd-service`, `hg-pd-client`, `hg-pd-common`, `hg-pd-grpc`, `hg-pd-cli`, `hg-pd-dist`, `hg-pd-test`

### hugegraph-store (9 submodules)
Distributed storage + Raft: `hg-store-core`, `hg-store-node`, `hg-store-client`, `hg-store-common`, `hg-store-grpc`, `hg-store-rocksdb`, `hg-store-cli`, `hg-store-dist`, `hg-store-test`

### Others
- **hugegraph-commons**: Shared utilities, RPC framework
- **hugegraph-struct**: Data structures (must build before PD/Store)
- **install-dist**: Distribution packaging, license files
- **hugegraph-cluster-test**: Cluster integration tests

## Distributed Deployment (BETA)
PD manages placement and metadata; Store owns partition data; Server serves graph queries.
Development and HA topologies differ; see `docker/README.md` for node counts and configuration.
# Architecture and module ownership

```text
Clients and ecosystem tools
│
▼
HugeGraph Server ─────────────────► RocksDB (standalone)
│
├─ metadata / placement lookup ─► PD ── coordinates ─► HStore nodes
└─ graph data requests ──────────────────────────────► HStore nodes (distributed)
```

PD supplies metadata, placement and membership information; Server sends graph data requests directly to the selected HStore nodes.

## Top-level ownership

- `hugegraph-server/`: graph engine, schema, tasks, traversers, REST/Gremlin/Cypher APIs and storage adapters.
- `hugegraph-pd/`: placement, metadata, cluster scheduling and PD clients.
- `hugegraph-store/`: partition storage, Store clients and Raft replication.
- `hugegraph-struct/`: shared graph structures, identifiers and serialization used across distributed modules.
- `hugegraph-commons/`: shared utilities and RPC infrastructure.
- `hugegraph-cluster-test/`: cross-component cluster validation.
- `install-dist/`: distribution assembly, dependency inventory and release metadata.
- `helm/hugegraph/` and `docker/`: Kubernetes and container deployment assets.

Read the nearest module `AGENTS.md` before changing an implementation. For current submodule membership and dependency edges, inspect the root and module POMs rather than maintaining a copied count here.
28 changes: 0 additions & 28 deletions .serena/memories/code_style_and_conventions.md

This file was deleted.

24 changes: 0 additions & 24 deletions .serena/memories/ecosystem_and_related_projects.md

This file was deleted.

49 changes: 0 additions & 49 deletions .serena/memories/implementation_patterns_and_guidelines.md

This file was deleted.

59 changes: 18 additions & 41 deletions .serena/memories/key_file_locations.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,21 @@
# Key File and Directory Locations
# Key file locations

## Build & Config
- `pom.xml` — Root multi-module POM
- `.editorconfig` — Code style rules
- `style/checkstyle.xml` — Checkstyle enforcement (hugegraph-style.xml was removed)
- `.licenserc.yaml` — License checker config
Use these paths as search anchors; follow the nearest README or `AGENTS.md` for local rules.

## Server (hugegraph-server)
- Core engine: `hugegraph-core/src/main/java/org/apache/hugegraph/` → `backend/`, `schema/`, `traversal/`, `task/`
- GraphSpace: `hugegraph-core/.../space/` → `GraphSpace.java`, `SchemaTemplate.java`, `Service.java`, `register/`
- REST APIs: `hugegraph-api/src/main/java/org/apache/hugegraph/api/` → `graph/`, `schema/`, `gremlin/`, `cypher/`, `auth/`, `space/` (GraphSpaceAPI), `metrics/`, `arthas/`
- OpenCypher: `hugegraph-api/.../opencypher/`
- Backend interface: `hugegraph-core/.../backend/store/BackendStore.java`
- Distribution: `hugegraph-dist/src/assembly/static/` → `bin/`, `conf/`, `lib/`, `logs/`
- Tests: `hugegraph-test/src/main/java/.../` → `unit/`, `core/`, `api/`, `tinkerpop/`
| Work area | Start here |
|---|---|
| Repository modules and versions | `pom.xml` |
| Build, contribution and documentation map | `docs/README.md`, `docs/BUILDING.md`, `docs/CONTRIBUTING.md` |
| Graph engine, schema, traversal and tasks | `hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/` |
| REST, Gremlin, Cypher and authentication APIs | `hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/` |
| Server distribution and runtime configuration | `hugegraph-server/hugegraph-dist/` |
| Server tests | `hugegraph-server/hugegraph-test/` |
| PD implementation and protocol | `hugegraph-pd/`, especially `hg-pd-core/`, `hg-pd-service/` and `hg-pd-grpc/` |
| Store implementation and protocol | `hugegraph-store/`, especially `hg-store-core/`, `hg-store-node/` and `hg-store-grpc/` |
| Shared graph structures | `hugegraph-struct/` |
| CI workflows and policy | `.github/workflows/`, `.github/scripts/`, `docs/ci.md` |
| Dependency and release metadata | `install-dist/release-docs/`, `install-dist/scripts/dependency/` |
| Docker and Compose | `docker/README.md`, `docker/` |
| Kubernetes and Helm | `helm/hugegraph/README.md`, `helm/hugegraph/docs/README.md`, `helm/hugegraph/values.yaml` |

## Docker
- `docker/docker-compose.yml` — Standalone Server + Hubble (bridge network)
- `docker/docker-compose-3pd-3store-3server.yml` — 3-node cluster
- `docker/docker-compose.dev.yml` — Dev mode

## PD Module
- Proto: `hugegraph-pd/hg-pd-grpc/src/main/proto/`
- Dist: `hugegraph-pd/hg-pd-dist/src/assembly/static/`

## Store Module
- Proto: `hugegraph-store/hg-store-grpc/src/main/proto/`
- Dist: `hugegraph-store/hg-store-dist/src/assembly/static/`

## CI Workflows (.github/workflows/)
- `server-ci.yml` — Server tests (matrix: memory/rocksdb/hbase × Java 17)
- `pd-store-ci.yml` — PD, Store & HStore tests
- `commons-ci.yml` — Commons tests
- `cluster-test-ci.yml` — Cluster integration
- `licence-checker.yml` — License headers
- `rerun-ci.yml` — Auto-rerun for flaky workflows
- `auto-pr-review.yml` — Auto-comment on new PRs
- `check-dependencies.yml` — Dependency checks
- `codeql-analysis.yml` — CodeQL security scanning
- `stale.yml` — Stale issue/PR cleanup

## Docs
- `README.md`, `docs/BUILDING.md`, `docs/CONTRIBUTING.md`, `AGENTS.md`, `CLAUDE.md`
Search the repository before assuming a path or configuration name is still current. This memory intentionally omits workflow filenames and submodule counts that change frequently.
37 changes: 15 additions & 22 deletions .serena/memories/project_overview.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
# Apache HugeGraph Project Overview
# Project overview

## Project Purpose
Apache HugeGraph is a fast-speed, highly-scalable graph database supporting 10+ billion vertices/edges for OLTP workloads. Graduated from Apache Incubator (incubating branding removed).
Apache HugeGraph is a graph database with standalone and distributed deployment modes. It provides a property-graph data model, schema and indexes, graph traversals, REST/Gremlin/Cypher access, authentication and operational tooling.

## Key Capabilities
- Apache TinkerPop 3 compliant graph database
- Gremlin + OpenCypher query languages
- Schema metadata management (VertexLabel, EdgeLabel, PropertyKey, IndexLabel) with TTL update support
- Multi-type indexes (exact, range, complex conditions)
- Pluggable backend storage (RocksDB default, HStore distributed)
- GraphSpace multi-tenancy (standalone mode disables GraphSpaceAPI/ManagerAPI)
- Swagger UI for REST API documentation
- Integration with Flink/Spark/HDFS
## Deployment modes

## Technology Stack
- **Language**: Java 17 (required; currently supported release)
- **Build**: Maven 3.6.3+
- **Graph Framework**: Apache TinkerPop 3.8.1
- **RPC**: gRPC + Protocol Buffers
- **API Docs**: Swagger (io.swagger.core.v3)
- **Storage**: RocksDB (default/embedded), HStore (distributed/production), HBase (deprecated; planned for removal in 2.0)
- **Standalone:** HugeGraph Server uses embedded RocksDB by default. The HBase backend remains supported but is deprecated. RocksDB is the shortest path for development and smaller deployments.
- **Distributed:** Server handles graph APIs, PD owns placement and metadata coordination, and HStore nodes own partition data and replication.

## Version
- Read `${revision}` from the root `pom.xml`; Maven flatten resolves it for published artifacts.
- License: Apache License 2.0
## Authoritative entry points

- Product and deployment overview: [`../../README.md`](../../README.md)
- Repository documentation map: [`../../docs/README.md`](../../docs/README.md)
- Build and contribution rules: [`../../docs/BUILDING.md`](../../docs/BUILDING.md), [`../../docs/CONTRIBUTING.md`](../../docs/CONTRIBUTING.md)
- Kubernetes deployment: [`../../helm/hugegraph/README.md`](../../helm/hugegraph/README.md)
- Repository agent guidance: [`../../AGENTS.md`](../../AGENTS.md)
- Current versions and module membership: [`../../pom.xml`](../../pom.xml)

Do not copy release versions or detailed feature lists into this memory. Read the owning source when exact current behavior matters.
59 changes: 0 additions & 59 deletions .serena/memories/suggested_commands.md

This file was deleted.

Loading
Loading