This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
- Full build:
./gradlew clean build - Fast build (skip tests):
./gradlew clean build -x test -x integrationTest - Fastest build (skip everything):
./gradlew clean build -x assembleDist -x distTar -x distZip -x check
- Unit tests only:
./gradlew clean test - Integration tests only:
./gradlew clean integrationTest - Both unit + integration:
./gradlew clean test integrationTest - Run single test class:
./gradlew :ignite-<module>:test --tests "*TestClassName*"
- All checks:
./gradlew clean check - Checkstyle only:
./gradlew checkstyleMain checkstyleIntegrationTest checkstyleTest checkstyleTestFixtures - Spotbugs only:
./gradlew spotbugsMain - PMD only:
./gradlew pmdMain pmdTest
- Create distribution packages:
./gradlew clean allDistZip - CLI package only:
./gradlew clean packaging-cli:distZip - DB package only:
./gradlew clean packaging-db:distZip - Docker image:
./gradlew clean docker -x test -x check
Use the ignite-cluster-setup skill for cluster management tasks (start, stop, status, init, etc.). See .justfile for all available recipes.
- Setup:
just setup- Build distributions and create node directories inw/ - Start node:
just start 1- Start node 1 (use 1, 2, or 3) - Stop node:
just stop 1- Stop node 1 - Initialize cluster:
just init- Initialize the cluster - Launch CLI:
just cli- Open interactive CLI - Check status:
just status- Show status of all nodes - Full setup:
just setup_cluster- Setup, start all nodes, and initialize
- Start node from distribution:
./bin/ignite3db start(from unpacked distribution) - Connect CLI:
./bin/ignite3(from CLI distribution) - Docker Compose cluster:
docker compose -f packaging/docker/docker-compose.yml up -d
- Run module benchmarks:
./gradlew clean :ignite-<module>:jmh - Run specific benchmark:
./gradlew clean :ignite-<module>:jmh -PjmhBench=BenchmarkName.methodName - JFR profiling:
./gradlew :ignite-<module>:jmh -PjmhProfileJfr
- Generate Javadoc:
./gradlew aggregateJavadoc - Module-specific Javadoc:
./gradlew javadoc
Apache Ignite 3 is built with a modular, component-based architecture where components form an acyclic dependency graph:
- Runner Module (
modules/runner/): Main entry point that wires up all components and handles node lifecycle - Network Module (
modules/network/): Group membership, messaging, and cluster communication - Metastorage Module (
modules/metastorage/): Distributed key-value storage for cluster metadata using Raft consensus - Catalog Module (
modules/catalog/): Schema management and DDL operations - Table Module (
modules/table/): Table API implementation and partition management - SQL Engine (
modules/sql-engine/): Distributed SQL query processing with Apache Calcite - Storage Engines: Pluggable storage with RocksDB (
modules/storage-rocksdb/) and in-memory (modules/storage-page-memory/) options - Transactions (
modules/transactions/): ACID transactions with MVCC and serializable isolation - Compute (
modules/compute/): Distributed compute framework for job execution - Configuration (
modules/configuration/): Dynamic configuration management system
Components are initialized in topological sort order based on dependencies. Each component:
- Has clearly defined dependencies provided at construction time
- Receives metastorage watch notifications in dependency order
- Must not create cyclic dependencies
- Uses the Vault (
modules/vault/) for persistent local state
- Schema-Driven: All operations are based on explicit schemas defined through DDL
- Watch-Based Updates: Components react to metastorage changes via reliable watch processing
- Pluggable Storage: Storage engines can be swapped (RocksDB, in-memory, custom)
- Partition-Based: Data is distributed using partition-based sharding
- Raft for Consensus: Critical components (metastorage, table partitions) use Raft for consistency
- Unit tests: Located in
src/test/java/- use JUnit 5 with@Testannotations - Integration tests: Located in
src/integrationTest/java/- test component interactions - Test fixtures: Located in
src/testFixtures/java/- shared test utilities - Benchmarks: Located in
src/jmh/java/- JMH performance benchmarks
Each module follows standard Gradle structure:
src/main/java/- Main source codesrc/test/java/- Unit testssrc/integrationTest/java/- Integration testssrc/testFixtures/java/- Test utilitiesbuild.gradle- Module-specific build configuration
Key modules are organized by functional area (storage, network, sql-engine, etc.) with clear API boundaries and minimal inter-module dependencies.
Run checkstyle and PMD on the modified module(s):
./gradlew :ignite-<module>:checkstyleMain :ignite-<module>:checkstyleTest :ignite-<module>:pmdMain :ignite-<module>:pmdTestRun IDEA inspections on the modified module(s):
idea inspect . .idea/inspectionProfiles/Project_Default.xml /tmp/results -d modules/<module>Notes:
- IntelliJ IDEA must be closed for command-line inspections to work.
- If
ideacommand is not available, ask the user to install it via: Tools > Create Command-line Launcher in IntelliJ IDEA. - Check results:
find /tmp/results -name "*.xml" ! -name ".descriptions.xml" -exec cat {} \;
Run IDEA inspections on the modified module(s) and fix all issues:
idea inspect . .idea/inspectionProfiles/Project_Default.xml /tmp/results -d modules/<module>IMPORTANT: Always run IDEA inspections before creating or updating a PR. The inspections catch issues that checkstyle/PMD miss (e.g., methods that can be static, redundant suppressions, etc.).
Never use git push without specifying the target branch. Always push explicitly:
git push origin <branch-name>- Prefer objects over static methods - Use constructor injection everywhere possible
- Always include Jira ticket link in PRs - Link to https://issues.apache.org/jira/browse/IGNITE-XXXXX
- All tickets must have the
ignite-3label - When resolving a ticket:
- Reviewer must be set (ask if unsure whom to set)
- Fix Version must be set